1213 type scripting?

Started by holden24, Thu 29/03/2007 07:57:14

Previous topic - Next topic

holden24

Firstly, sorry if this is in the wrong forum, I didn't know where else to put it (except for maybe the Technical Forum).
Could someone please help me to script these actions?

1. When you press the Spacebar 1213 jumps forward, how would I script the animation for jumping forwards, because my character jumps back to his original position eg.
Code: ags
if (keycode == 32) {
player.LockView(5);
player.Animate(player.Loop, 5);
player.UnlockView();
}


2. For jumping up and grabbing onto ledges, how would you script that?

and 3. For falling down when you jump and theres no walkable areas underneath you?

any help would be appreciated, thanks in advance.

Ashen

#1
This thread has a link to Bernie's platform module. It's been a while since I used it, but I think it works OK. It might be a little complicated, but you should be able to either use it as-is, or extract woring 'jumping' code from it. (A forum search for 'jumping' should turn up a few other options, that was just the first and best.)
I know what you're thinking ... Don't think that.

holden24

#2
I'll try the jumping module tommorrow. I'll let yous know how it was later.

EDIT- I tried it now and there is no instructions, and the forum post dont explain it in that forum!!! ???  :o

R4L

To tell you, there isn't one function that will just make the character jump. Bernie's platform model is probably the best way to achieve the style of gameplay you need. It just takes a little tweaking.

holden24

What kind of tweaking, my character keeps floating up into the sky and I don't know how to stop it!!!

R4L

Then your doing something wrong with the code.

Seriously, study that code. You'll start to understand it if you understand the basics of variables and ints.

Ashen

You're not going to be able to make a 1213-style game without some fairly advanced coding. AGS isn't meant for that kind of game, and while it's obviously possible there's no easy way to do it.

As R4L said, study the code, try to figure out what it does and where you've gone wrong. If that's a bit overwhelming - start with soemthing simpler, get to know the language and the commands used, until you feel comfortable enough to make it work. (Further questions specfically about Bernie's module should probably go in that thread, but try to get an idea where the problem is first.)
I know what you're thinking ... Don't think that.

holden24

I'm preparded to do some hard scripting, there's only one problem with the module.
My character doesn't move in his walking view when i try to move him with the arrow keys.

R4L

That might be because the module doesn't have that scripted in.

Search for a Keyboard Movement module. It takes no scripting, you just have to load the module. Although it will mess with Bernie's code a bit.

holden24

Okay I'll explain everything...

I have a KeyboardMovement Module that I'm using, in game start it has
Code: ags

KeyBoardMovement.SetMode(eMode_Pressing);

but still Bernies Module makes the character move left and right and up and down by pressing Up, Down, Left and Right arrow keys.
When I take the code out of Bernies module to stop the character from moving my character can now walk (in his walking view) but cannot jump (by pressing the space bar in Bernies Module).
That's my problem.

holden24

It's sure taking a loooooooooooooong time for a reply!!!

JD

Quote from: holden24 on Sat 31/03/2007 01:20:09
I'm preparded to do some hard scripting

If you're prepared to do some 'hard scripting' then you should just code it yourself, from scratch. Probably easier than trying to merge different modules into what you want em to do.

SMF spam blocked by CleanTalk