OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: AnarCHy on 25 Feb 2005, 03:17:51
-
lol you can change this to w/e you want if it seems wrong...but i am gonna use this thread for most of my Q's on MP instead of wasting more psace making another one.
(this is the original Q)
Time is the question here
i have been fiddling around with a map...and well i need a script/loop that every 60 seconds, an hour passes. would it look like this: #loop
skiptime 1000
~60
goto "#loop"
?? or am i just kind of getting no where here lol
thanks much
AAA
-
Hmmm....
skiptime X
The 'X' is in hours.
#loop
skiptime 1
~60
goto "#loop"
I think ::)
Planck
-
i tried it, and yes, the "X" is in hours, so 1 would advance it one hour...i just cant get it to loop right
it goes, after 60 seconds it advances one hour, then it doesnt advance the time any more, not after 60, 120, 180, 1993025843260923098570943 seconds, it wont loop
??? whats happenin lol?
AAA
-
goto "#loop"
should be:
goto "loop"
-
that script will skip 1 hour, then wait 60 seconds, and if you correct it as General Barron said it will go back and skip 1 hour, wait 60 seconds etc etc...you should place the ~60 before skiptime if you want it to wait 60 seconds after it starts :)
-
goto "#loop"
should be:
goto "loop"
Tch tch........I should have noticed that.
In my defense, I will say it was early in the morning and I should have gone to bed by then. ;D ;D ::) ::)
Thats my excuse anyway.....and I'm sticking to it.
Planck
-
If you want it to be more precise timing wise use:
_reftime = _time
@_time - _reftime >= 60
in place of:
~60
-
Tch tch........I should have noticed that.
In my defense, I will say it was early in the morning and I should have gone to bed by then. ;D ;D ::) ::)
Thats my excuse anyway.....and I'm sticking to it.
Planck
LOLOL ;D
Ehm me thinks skipping 1 hour will look "brutal":hmm:
Wouldnt it be better to use smaller skiptimes to have a smoother change?
Thats what we use:
#start
? (daytime >= 4.5) && (daytime < 7.5):_delay = 2.5;_skip = .05
? (daytime >= 7.5) && (daytime < 16.5):_delay = 30;_skip = 0.4
? (daytime >= 16.5) && (daytime < 20):_delay = 2.5;_skip = .05
? ((daytime >= 20) && (daytime < 24)) || ((daytime > 0) && (daytime < 4.5)):_delay = 20;_skip = 0.4
~_delay
skipTime _skip
goto "start"
From the ECL MP template (Terox-Pimm)
-
I got to agree with Platoon...it will most likely look quite bad with 1 hour...suddenly it'll turn totally dark in 1 second, then suddenly turn bright again...and the sun will jump from spot to spot :P Better skiptime less and have a shorter loop ;)
-
yeah wow thanks platoon, it worked perfectly! with my weather effect script its gonna look nice
i have quite a few other questions but ill ask them when im sure they havent been asked before.
thanks again,
AAA
-
next question if you guys dont mind answering it; how do i change the player's skin (model, like SoldierW etc.) in MP, so if one guy chooses to put on camo he can choose to do so, and only he will be effected and only he will black in/out when the model changes?
thanks much, all help is appreciated a LOT :-[
cheers :cheers:,
AAA
p.s. if i seem to be a bit noobish is because im still quite new in scripting, know only basic commands and i could really use your guys' help on this. thanks again!
-
how do i change the player's skin (model, like SoldierW etc.) in MP, so if one guy chooses to put on camo he can choose to do so, and only he will be effected and only he will black in/out when the model changes?
Afaik that's not possible...
[edit]
...unless you create your own units with hidden selections (or use addon units that already have that feature).
[/edit]
-
how do i change the player's skin (model, like SoldierW etc.) in MP, so if one guy chooses to put on camo he can choose to do so, and only he will be effected and only he will black in/out when the model changes?
Someone posted a way to do this in MP a few weeks ago... I think it was Roni, but I can't seem to find the post he wrote it in. I believe it went something like this:
set respawn to group (unit gets respawned into next unit in his group)
after player dies, join a new unit to his group
player respawns into the new unit
But I'd try doing a search for the post I'm talking about. I think it was in the General/Advanced forum.
-
http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=22073