Script to end game once a trigger is, "triggered"
Moderator: Core Staff
Script to end game once a trigger is, "triggered"
How would you do that? also once its triggered the allies, and only allies team can score, they get 1000 kills extra on there team.
Very easy
Code: Select all
trigger waittill("trigger",user);
user.score=1000;
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
better if you want to keep score:
edit: place it in your gsc ^^
Code: Select all
trigger waittill("trigger",user);
endMap();
edit: place it in your gsc ^^
im just trying to create a fun map
im just trying to create a fun map for like dm and stuff. could i do that for cod2? like place a trigger somewhere and when they step in it have them gain a certain amount of points? and if so how do i make it with trigger? trigger texture then what key and what value
its exactly the same in cod2, key has to be targetname and value can be any name you want (put your mapname in front though to reduce chances of conflicting)
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
That is possible
I shall have a go:
This should work, but this is very simplistic. If you are planning to have two teams, then use Team Deathmatch game type and use this:
If you have any questions, just ask and I will explain.
I shall have a go:
Code: Select all
main()
{
maps\mp\_load::main();
getent("kingofhill_trigger","targetname") thread kingofhill_trigger();
}
kingofhill_trigger()
{
while(1)
{
self waittill("trigger", other);
while(other isTouching(self))
{
self.score++;
wait 1;
}
wait 0.05;
}
}
Code: Select all
main()
{
maps\mp\_load::main();
level.pointNum = 0;
getent("kingofhill_trigger_axis","targetname") thread kingofhill_trigger_axis();
getent("kingofhill_trigger_allies","targetname") thread kingofhill_trigger_allies();
}
kingofhill_trigger_axis()
{
while(1)
{
self waittill("trigger", other);
while(other isTouching(self))
{
if(self.pers["team"] == "allies")
{
self.score++;
wait 1;
}
else
self iprintln("This is your base.");
}
wait 0.05;
}
}
kingofhill_trigger_allies()
{
while(1)
{
self waittill("trigger", other);
while(other isTouching(self))
{
if(self.pers["team"] == "axis")
{
self.score++;
wait 1;
}
else
self iprintln("This is your base.");
}
wait 0.05;
}
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
So did it work? Any luck?
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Who is online
Users browsing this forum: No registered users and 44 guests