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.

FPSC Classic Scripts / Need Help with a simple friendly fire script

Author
Message
Hunter Studios
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: C:\\
Posted: 12th Nov 2007 04:06
I am trying to make a script that when you kill an ally it shows (it can be an image or HUD text whichever is recommended) Friendly Fire will not be tolerated and than kills you. Here is what I have so far but nothing happens when i put it ingame.



www.hunterstudios3d.com
Dark Jaguar Flame
17
Years of Service
User Offline
Joined: 9th Aug 2007
Location: The Netherlands
Posted: 12th Nov 2007 14:39
You dont have a hud loaded before this line.
And you dont have a HUD adres,
check http://forum.thegamecreators.com/?m=forum_view&t=107495&b=23 for this and you know how you must fix this.

Can i script? Uhmm i think that i can script...
Storm 6000
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location:
Posted: 12th Nov 2007 14:39 Edited at: 12th Nov 2007 14:40
I presume the hud is already setup

make a copy of the death script the ally character is useing then, put that code into it, keeping what already there, prehaps add an additional state then add that code in that state and it will activate when that character is dead. You also won't need to healthless=0 condition.

Thanks
Adam
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Nov 2007 01:42
Mostly correct, but you ARE loading your HUD text incorrectly, it needs to be loaded a certain way so that the text is actually created within the engine and given a name to call it later on.

You may want to check out my scripting tutorials (link above the picture in my signature).


The one and only,
~PlystirE~

Hunter Studios
17
Years of Service
User Offline
Joined: 17th Jan 2007
Location: C:\\
Posted: 13th Nov 2007 02:50
Thanks now it works and it kills the player when you kill an ally but then when you respawn the hud is still there. Here is what i have for my script now



www.hunterstudios3d.com
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Nov 2007 03:23
hudhide is an action that is only used on HUds that are in the process of being created inside the engine. if you want to hide a HUD after it has been created, then use "hudunshow" or "hudfadeout"


The one and only,
~PlystirE~

Login to post a reply

Server time is: 2024-11-24 02:02:18
Your offset time is: 2024-11-24 02:02:18