Random Timer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Random Timer (
/showthread.php?tid=185691)
Random Timer -
knackworst - 25.10.2010
He guys, I have a cool maze map for my server, but to make it even cooler I want to change walls, like every 20seconds a wall moves... well is this possible whitout doing a command all the time?
Re: Random Timer -
Jack Shred - 25.10.2010
You could use a 'timer function' that uses variables to know which walls he should move.
You need to be a bit experienced with timers though.
Little example:
forward ObjectTimer();
public ObjectTimer()
{
MoveObject(objectid, Float:X,Float:Y,Float:Z, Moving Speed);
return 1;
}
public OnGameModeInit()
{
SetTimer("ObjectTimer, 5000, true);
return 1;
}
This is just a minor example how to move an object in 5 seconds.
You can use 'variables' ( new ...; ) to let the script figure out where the object should move to.
Re: Random Timer -
knackworst - 25.10.2010
hmm, I don't really get, can you make it a little bit advanced please?
Re: Random Timer -
dark_clown - 25.10.2010
off topic: knack looks like u have a messy, but a cool idea of your gamemode can i check it?
ip if it? and u can just add a normal timer
Re: Random Timer -
Jack Shred - 25.10.2010
Quote:
Originally Posted by knackworst
hmm, I don't really get, can you make it a little bit advanced please?
|
Well, that's the most easiest way I can explain it to you..
So you should wait for another reply, else you might want to check out 'SA:MP' Wiki, loads of usefull information there!
Re: Random Timer -
knackworst - 25.10.2010
Quote:
Originally Posted by Jack Shred
Well, that's the most easiest way I can explain it to you..
So you should wait for another reply, else you might want to check out 'SA:MP' Wiki, loads of usefull information there!
|
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...
btw, i'm new in scripting, so that makes it extremely hard...
Re: Random Timer -
Jack Shred - 25.10.2010
Quote:
Originally Posted by knackworst
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...
btw, i'm new in scripting, so that makes it extremely hard...
|
Maybe you should try some less hard scripts for you and learn the basic ropes.
Anyway, here some SA:MP Wiki info about timers, might want to check out the 'related functions' aswell.
https://sampwiki.blast.hk/wiki/SetTimer
Good luck.
Re: Random Timer -
knackworst - 25.10.2010
Quote:
Originally Posted by knackworst
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...
btw, i'm new in scripting, so that makes it extremely hard...
|
@clown, lol ofc, if I finished it...
Re: Random Timer -
dark_clown - 25.10.2010
Quote:
Originally Posted by knackworst
@clown, lol ofc, if I finished it...
|
ill help you just pm me with ur ip