OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: AnarCHy on 25 Feb 2005, 03:17:51

Title: AnarCHy's question section
Post 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:
Code: [Select]
#loop
skiptime 1000
~60
goto "#loop"
?? or am i just kind of getting no where here lol

thanks much
AAA
Title: Re:day to night to day
Post by: Planck on 25 Feb 2005, 03:28:20
Hmmm....

skiptime X

The 'X' is in hours.

#loop
skiptime 1
~60
goto "#loop"

I think   ::)


Planck
Title: Re:day to night to day
Post by: AnarCHy on 25 Feb 2005, 05:32:56
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
Title: Re:day to night to day
Post by: General Barron on 25 Feb 2005, 06:30:39
goto "#loop"

should be:

goto "loop"
Title: Re:day to night to day
Post by: Garcia on 25 Feb 2005, 17:06:54
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 :)
Title: Re:day to night to day
Post by: Planck on 25 Feb 2005, 21:08:47
Quote
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
Title: Re:day to night to day
Post by: Raptorsaurus on 25 Feb 2005, 21:55:14
If you want it to be more precise timing wise use:

Code: [Select]
_reftime = _time
@_time - _reftime >= 60

in place of:

Code: [Select]
~60
Title: Re:day to night to day
Post by: Platoon Patton on 25 Feb 2005, 22:22:56
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:
Code: [Select]
#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)
Title: Re:day to night to day
Post by: Garcia on 26 Feb 2005, 00:37:25
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 ;)
Title: Re:day to night to day
Post by: AnarCHy on 26 Feb 2005, 00:44:10
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
Title: Re:AnarCHy's question section
Post by: AnarCHy on 26 Feb 2005, 00:48:59
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!
Title: Re:AnarCHy's question section
Post by: AK-Chester on 28 Feb 2005, 21:22:58
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]
Title: Re:AnarCHy's question section
Post by: General Barron on 01 Mar 2005, 03:21:14
Quote
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.
Title: Re:AnarCHy's question section
Post by: Blanco on 02 Mar 2005, 04:42:02
http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=22073