Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Make an object stop moving...

Author
Message
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 22nd Apr 2005 06:53
Basically in my fps game, when i shoot a zombie i made it so the animation stops and the object turns horrizontal. But the object carries on coming towards me. So how to i make the object stay in the place i shot it? My code is below on the movement of the zombie and the code when i shoot it.



Thanks in advance!

Nameless
20
Years of Service
User Offline
Joined: 11th Apr 2004
Location: U.S.A.
Posted: 22nd Apr 2005 07:39
You want to change it so it only moves if the zombie is alive, so before you use move object you should make sure that the zombie is not dead.

try this:


then at the top of your code(before the main loop) add



Hope that helps
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 22nd Apr 2005 07:43 Edited at: 22nd Apr 2005 08:02
Hmm...i did this but it says "line 397 is out of place", but that line has just got "loop" on it?? You know why?

Psycho Gary
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location: The United Kingdom....is boring
Posted: 22nd Apr 2005 08:03
sounds like you missed out an endif

:p
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 22nd Apr 2005 08:10 Edited at: 22nd Apr 2005 08:13
Yup im a complete dumbass...it works now! Thanks DB programmer for the code!

Thanks

Login to post a reply

Server time is: 2024-09-23 17:31:57
Your offset time is: 2024-09-23 17:31:57