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 / Can't crack this coding (involves mutliple variables)

Author
Message
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 14th Jun 2012 08:45
Hi all, I'm not sure if anyone here remembers me, but I have been very busy with my Zombie Moon project. However there is one last major hurdle I cannot seem to overcome. I am creating a round system using a modified version of Conjured's Cash System. I have set up two different variables (cecashcounter for the kills, and ceroundcounter for the rounds). My script thusfar is as follows:

The problem is when I reach the 4 kills to add one var to the round, it keeps going up instead of stopping at 2. I've tried adding ',state=1' to the end of each line to no avail. I am at a loss here as to how to get this to properly add just 1 number when the killcount is reached each time. Any help is greatly appreactiated. By the way I am using version 1.19.09.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 14th Jun 2012 15:35
:state=0,varequal=cecashcounter 4:addvar=ceroundcounter 1,state=1
:state=1,varequal=cecashcounter 12:addvar=ceroundcounter 1,state=2
:state=2,varequal=cecashcounter 24:addvar=ceroundcounter 1,state=3
...

Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 15th Jun 2012 01:31
Quote: ":state=0,varequal=cecashcounter 4:addvar=ceroundcounter 1,state=1
:state=1,varequal=cecashcounter 12:addvar=ceroundcounter 1,state=2
:state=2,varequal=cecashcounter 24:addvar=ceroundcounter 1,state=3
...
"


Naah, just do this:
:state=0,varequal=cecashcounter 4:addvar=ceroundcounter 1, setvar=cecashcounter 0

That oughta do it.
-Anigma

It compiled! Ship it!
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 15th Jun 2012 04:06
For some reason both of those don't seem to work. Now the counter doesn't even go up at all. I've tried a mixture of the two codes also with no luck. :/ I may just end up going without for this one. Thanks anyway for the help guys.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 15th Jun 2012 13:45
i hope you stuck to the buildup of conjureds set, using nonstatic object for running this script. if not, it will stop running when you are too far away.

also you have to setup the dimvars at the beginning of the level, just to mention. should work then, depending on the scripts triggering the var-raise.

Login to post a reply

Server time is: 2024-11-24 00:42:50
Your offset time is: 2024-11-24 00:42:50