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 / Variable script not working...[PB Mod v1.8c Beta]

Author
Message
Explosm69
14
Years of Service
User Offline
Joined: 22nd Jul 2010
Location:
Posted: 21st Feb 2011 05:28
The script is supposed to show a hud when you get near it, the hud changes every time you get away and get near it...but it isn't doing anything.

Note: the one in the script isn't the hud but it is in the gamescore when you get this game maker.

Heres the script code


Cyanide & Happiness 4 Ever
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 21st Feb 2011 06:57
Good effort, but there are many problems with this script.

Te "showhud=" action will never be executed because if you set the FPI state to 1, the variable will be reset to 0 before the next line is tested. You should make the state condition of line 4 different.

On line 3 you have:

Quote: ":...:...,state=10,state=9"


"state=10" will always be over-written by "state=9" here so you need to delete one.

then on line 5 you have:

Quote: ":state=9...:...,state=2"


But then you have no logic based on state=2 so the script just loops without doing anthing else. Should this be "state=3"? Similar comment for line 6.

I should also point out that the condition "anywithin=" is applicable to any entity, not just the player and so will be true if an enemy or any other dynamic object is close to the entity containing this script.

Just some thoughts.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Explosm69
14
Years of Service
User Offline
Joined: 22nd Jul 2010
Location:
Posted: 21st Feb 2011 07:40
Thanks
Quote: "
The "showhud=" action will never be executed because if you set the FPI state to 1, the variable will be reset to 0 before the next line is tested. You should make the state condition of line 4 different.
"


Huh...Didnt really kno that

Quote: " ...State=10,State=9 "


i didnt kno It would not go to state 9

Quote: " State=9...:...State=2"


I was tweaking it around and i might of pressed 2, so yes it was supposed to be 3

Quote: "I should also point out that the condition "anywithin=" is applicable to any entity, not just the player and so will be true if an enemy or any other dynamic object is close to the entity containing this script."


Yes I am well aware of this.

Cyanide & Happiness 4 Ever

Login to post a reply

Server time is: 2024-11-24 11:47:22
Your offset time is: 2024-11-24 11:47:22