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 / Water script help?

Author
Message
The Grunge Guy
14
Years of Service
User Offline
Joined: 25th May 2010
Location: Stalking The Mods.....
Posted: 7th Dec 2011 01:54
I'm having trouble getting my water script working and I can't seem to get it right any clues?



maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 7th Dec 2011 10:04 Edited at: 7th Dec 2011 10:07
you dont start the timer anywhere (and i would say use etimer instead of timer), and i never heard of waterheight=X, only waterheightofzone=X.
and i would suggest to change state-values 1 down, the script always start to run state=0, so set state=0 to state=1 a.s.o.


:plrwithinzone: to :state=0,plrwithinzone=1:state=1


:STATE=0:water=1,waterfogdist=2000,waterheight=400,STATE=1

to

:STATE=1:water=1,waterfogdist=2000,waterheightofzone=400,etimerstart,STATE=1
...

justmy2cents to go on.
The Grunge Guy
14
Years of Service
User Offline
Joined: 25th May 2010
Location: Stalking The Mods.....
Posted: 7th Dec 2011 21:21
I did like you suggested and it worked pretty well, however the etimer didn't work and I had to change it to regualr timer, this one was only a test and now I plan on making a tidal system for my marine science class. Now I just have to figure out the math.

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 7th Dec 2011 23:16
Quote: "however the etimer didn't work and I had to change it to regualr timer"


First off, the "etimer" does work. It is the same usage as "timerstart" and "timergreater". We use it all the time.

Second, could you specify what version of FPSC you are using? Not everyone uses the newest, and this helps for those wanting to assist.


Twitter: @NFoxMedia
The Grunge Guy
14
Years of Service
User Offline
Joined: 25th May 2010
Location: Stalking The Mods.....
Posted: 8th Dec 2011 02:22
I'm sorry, I should have stated that. To many hours without sleep, forgot my mannors. I'm currently useing version 1.18.003. The "etimer" did not work in this specific case, however, when I changed it to "timerstart" it did. I've managed to work it out with the suggestions made by maho76. Thank you, it really did help. I'm going to complicate the script further so it has a more fluid effect as this was only a test.

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th Dec 2011 04:52
Quote: "I'm sorry, I should have stated that. To many hours without sleep, forgot my mannors. I'm currently useing version 1.18.003. The "etimer" did not work in this specific case, however, when I changed it to "timerstart" it did. I've managed to work it out with the suggestions made by maho76. Thank you, it really did help. I'm going to complicate the script further so it has a more fluid effect as this was only a test."


No worries, glad you got it figured out. Strange the "etimer" did not work though. However, when it works, run with it.


Twitter: @NFoxMedia
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 8th Dec 2011 09:36 Edited at: 8th Dec 2011 09:37
^^ for the etimer-thing: OF COURSE you have also to change the TIMERGREATER=X in your script into ETIMERGREATER=X. didnt mention this because i thought it was the logical next step

but good to hear it works for you now. and yes, always use etimerstart/etimergreater=x instead of the regular timer. you wont get in trouble in complex maps then.
The Grunge Guy
14
Years of Service
User Offline
Joined: 25th May 2010
Location: Stalking The Mods.....
Posted: 8th Dec 2011 12:29
Alrighty, but, whats the difference between the two? What makes the "etimer" better then the regular "timer"? I'm wondering for future refrence as I might prefer one over the other in particular areas of script.

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 8th Dec 2011 14:28
etimer is used specifically for the entity you use it. timer is a global var only usable once a time for the whole map, so you will get in trouble if more than 1 script wanna use the timer. that doesnt happen with etimers. so delete timerstart/timer out of your mind and use etimer instead.

gz

maho
The Grunge Guy
14
Years of Service
User Offline
Joined: 25th May 2010
Location: Stalking The Mods.....
Posted: 10th Dec 2011 15:57
Okay, that works, thank you.

Login to post a reply

Server time is: 2024-11-24 04:33:53
Your offset time is: 2024-11-24 04:33:53