The Daily Click ::. Forums ::. Klik Coding Help ::. Random Jumping
 

Post Reply  Post Oekaki 
 

Posted By Message

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
27th September, 2004 at 22:07:05 -

I'm making a RPG as a little side quest-ish thing, and I need to know how I would do all of my attacks.

I need to have it so that I select a enemy to jump on, and my charater needs to jump in an arch to the enemy, which is X distance away. Is there anyway to do this?

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Paul_James



Registered
  02/07/2002
Points
  1320
27th September, 2004 at 22:35:55 -

okay this is what i thought off i didnt try it out but it should work
make 3 objects, - an enemy, a player, and a player holder (invisible where the player stands)

action is selected (whatever ur conditions is to make him jump)-
set alterate value of player holder to x position of player holder - x position of enemy.
set player holder internal flag (1) to on
((this makes an alterate value equal to the distance the player has to travel))

alterate value of player holder is greater than (x position of player holder - x position of enemy)/2 -
subtract fomr alterate value of player holder 1
set x position of player to x position of player minus 1
set y position of player to y position of player minus 1 (the more u subtract the y position - the more arch affect you'll get)
((this tells the player if the player holder's value is greater than half the distance he has to travel then he'll move to left one pixel and up one pixel))

alterate value of player holder is less than (x position of player holder - x position of enemy)/2 -
subtract from alterate value of player holder 1
set x position of player to x position of player minus 1
set y position of player to y position of player plus 1 (once again the more you add the faster he'll fall))
((this tells the player that at less than half the distance to begin his fall))

alterate value of player holder less than or equal to 0
internal flag 1 is on
player y position is less than enemys y position + 5 ((or how big your enemy is from his hotspot - his relative 0,0)) -
set y position of player to y position of player plus 1 (( just incase your enemy and the player have different y values so that the player would not hit the enemy at all - he'll drop over him))

player collides with enemy
internal flag 1 is on
set alterate value of player holder to 0
set internal flag 1 to off
set position of player to (0,0) from player holder



 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...
   

Post Reply



 



Advertisement

Worth A Click