PDA

View Full Version : Control issues.



Copes
August 30th, 2006, 01:43 PM
Hi guys.

crikey i havent posted here in an age. Anyway im again working on milos adventure, and ive been doing the blocking action using the shift key.

Im running into trouble though because i want him to block while just holding shift that then changes the graphic into him holding the shield. still image.

however i also want when you hold shift and move (direction keys) for him to animate.

now i can get either "one" of these to work and i assume its because of using the if key is down shift. line for standing and blocking cancelling out what im saying for if shifts down and a direction is also down.

Is there a way to say (if we use the right arrow button as an example)
if (Key.isDown(Key.SHIFT) "but right isnt down") {
do this
}

Thanks :love:

Joppe
August 30th, 2006, 02:31 PM
if(Key.isDown(Key.SHIFT)&&!Key.isDown(Key.RIGHT)){//do this}

That should work :)

Copes
August 30th, 2006, 02:54 PM
Cheers that worked a treat! hes now blocking happy as larry. :thumb2:

links on my sig if you wanna check it out :) (dont mind the horrible loading and menu screens.. lol its on my list.) and for anyone who has played it before you cant leave the house anymore. i deleted all of the tiles apart from inside his house. New scene, storyline and what not to come :sc:

Joppe
August 30th, 2006, 02:55 PM
Ive played earlier version, with outdoor terrain. And even an quest if I can remember correctly :)

Seems nice, altought the fire is quite hard to kill

Copes
August 30th, 2006, 03:12 PM
lol yea dont mind that. hes just beefed up at the moment to test different things :)