Page 1 of 1
Posted: April 18th, 2006, 1:33 pm
by KemiX
I would love to try, but I dont understand anything about that scripten.. I can do actionscript but not that

Posted: April 18th, 2006, 7:25 pm
by Nightmare
Well what you could do is make a trigger_once but that would make it so only the first person in the whole server could make it work. I'm sure its possible but I dont know how.
Posted: April 18th, 2006, 7:45 pm
by Drofder2004
Ok, this is the way I like to do things. Make a trigger that covers the spawn areas (so, touching the spawns) then make it a trigger_multiple with targetname "start" and then make a trigger_use for the finish button called "finish". Then try this code.
Code: Select all
main()
{
thread start();
}
start()
{
start = getent("start","targetname");
start waittill("trigger",user);
user thread finish_trigger();
}
finish_trigger()
{
finish = getent("finish","targetname");
finish waittill("trigger");
if(!isDefined(self.finishedmap))
{
iprintlnbold(self.name + "^7has completed the map!");
self.finishedmap = true;
}
}
Try that, see if you get any problems (I cannot test for myself atm)
Posted: April 18th, 2006, 9:09 pm
by Drofder2004
KillerSam wrote:drofder.....you amaze me, that works perfectly and credit will given to you on my loading screen, now that i know that code...im sure i can find lots of simliar uses for it......realy greatful

Good good

Ejoy

Posted: April 18th, 2006, 9:24 pm
by Luke
Very nice, i knew Drofder would have an answer for this

Posted: April 18th, 2006, 11:13 pm
by Drofder2004
KillerSam wrote:drofder.....you amaze me, that works perfectly and credit will given to you on my loading screen, now that i know that code...im sure i can find lots of simliar uses for it......realy greatful

tbh, the script is VERY basic.
its just people dont think about creating their own vairables (such as "self.finishedmap").
Posted: April 18th, 2006, 11:41 pm
by Drofder2004
Well, what im on about is the "self.<variables>"
easily used...
self.boolean = true; // or false;
self.integer = 123; //etc
self.string = "Hello";
you can even double the variables for example...
self.string.one = "Hello";
self.string.two = "Welcome";
You can use anything. You will notice most things that are map specific are...
level.<something> = <something>;
All variables must be defined before you use them... eg
You cannot do
if(self.boolean == false)
iprintln("Blah");
if self.boolean has no value (you will get an error). so you must "declare" them, simply using the method above...
<variable> = <value>;
self.finishedmap = true;
Ja?
Posted: April 19th, 2006, 12:06 am
by Nightmare
wow drof, I'm amazed at how simple you kept it, good job

Posted: July 22nd, 2006, 7:38 pm
by creator
is it also possible to make:
trigger_once instead trigger_use
so it works only ones per person
or will it only work 1 time?
cause i dont want it to be a button so just be activated wen u walk thru it.
Posted: July 22nd, 2006, 7:39 pm
by Drofder2004
trigger_once does what it says.
It can only be triggered once (usually used in SP, for missions)
Posted: July 22nd, 2006, 7:46 pm
by creator
so how i make a trigger that be activated only once by 1 player
so everyone can walk in it and it only be triggerd ones
Posted: July 22nd, 2006, 8:02 pm
by creator
...
so how i make it:
it only triggers ones per person
so if i walk thru it it works
if u walk thru it it works
if i walk again thru it it doesnt work
how can i do that wat i need to use?
trig_multiple?
or cant be possible?
Posted: July 22nd, 2006, 10:35 pm
by Drofder2004
creator wrote:...
so how i make it:
it only triggers ones per person
so if i walk thru it it works
if u walk thru it it works
if i walk again thru it it doesnt work
how can i do that wat i need to use?
trig_multiple?
or cant be possible?
Read page 1.