Sign in to follow this  
Followers 0
jeffskye

Placing endmap triggers with plugin

16 posts in this topic

Does someone know how to create a trigger_multiple with a script?

 

I'm gona try to fix maps that dont have a "endmap_trig" trigger.

But i can't find any scripts with something like spawn("trigger_multiple", (0,0,0 ), 0, 0, 0 ); in it.

and if you know do you also know how to give it a targetname? ( endmap_trig )

 

Would be very nice if someone of you could help me.

0

Share this post


Link to post
Share on other sites

Next time learn the basics in place of asking every single detail to us while you just started today or yesterday..

 

I know how to make them in radiant. I map and script for fun.

Right now im searching for something to script because it's fun to script. I love making deathrun plugins.

 

I'm trying to make an plugin you can use to fix maps that don't have an endmap trigger.

but i can't find anything about spawning an trigger_multiple through a script only trigger_radius but im not sure if that would work to.

 

I'm also looking for a way to give the spawned trigger a targetname if someone knows how that also would be really helpfull.

0

Share this post


Link to post
Share on other sites

Next time learn the basics in place of asking every single detail to us while you just started today or yesterday..

 

http://wiki.modsrepository.com/index.php?title=Call_of_Duty_4:_mapping_mp

this is his first thread asking for help while you have already made 4 threads asking for help :dumb:

 

on topic:

 

the easiest way to do the endmap thingy is to create a trigger_radius (only type of trigger that can be spawned via script) and use isTouching() to see when a player hits the trigger. a more complicated way to do it would be checking if the player is inside a certain x,y,z range 

 

EDIT: use waittill( "trigger", player) with trigger_radius instead of isTouching() :dumb:

0

Share this post


Link to post
Share on other sites

I know how to make them in radiant. I map and script for fun.

Right now im searching for something to script because it's fun to script. I love making deathrun plugins.

 

I'm trying to make an plugin you can use to fix maps that don't have an endmap trigger.

but i can't find anything about spawning an trigger_multiple through a script only trigger_radius but im not sure if that would work to.

 

I'm also looking for a way to give the spawned trigger a targetname if someone knows how that also would be really helpfull.

 

Oh.. now you are more clear about it lol

0

Share this post


Link to post
Share on other sites

this is his first thread asking for help while you have already made 4 threads asking for help :dumb:

 

on topic:

 

the easiest way to do the endmap thingy is to create a trigger_radius (only type of trigger that can be spawned via script) and use isTouching() to see when a player hits the trigger. a more complicated way to do it would be checking if the player is inside a certain x,y,z range 

 

EDIT: use waittill( "trigger", player) with trigger_radius instead of isTouching() :dumb:

Thanks a lot!

 

So something like this would work?

init( modVersion )
{
	trig = spawn("trigger_radius", (0,0,0 ), 0, 0, 0 );
	
	while(true) //or for(;;)
	{
		trig waittill( "trigger", player )
		player thread braxi\_mod::endTimer();
	}
}

This is just an short example!

0

Share this post


Link to post
Share on other sites

Thanks a lot!

 

So something like this would work?

init( modVersion )
{
	trig = spawn("trigger_radius", (0,0,0 ), 0, 0, 0 );
	
	while(true) //or for(;;)
	{
		trig waittill( "trigger", player )
		player thread braxi\_mod::endTimer();
	}
}

This is just an short example!

 

Yes.

 

This the syntax btw, Spawn( <classname>, <origin>, <flags>, <radius>, <height> )

0

Share this post


Link to post
Share on other sites

Thanks a lot!

 

So something like this would work?

init( modVersion )
{
	trig = spawn("trigger_radius", (0,0,0 ), 0, 0, 0 );
	
	while(true) //or for(;;)
	{
		trig waittill( "trigger", player )
		player thread braxi\_mod::endTimer();
	}
}

This is just an short example!

yes, that would work. use while(1) instead of while(true) :sir:

 

also, to make the triggers only appear in the specific map, get the mapname dvar and use a switch - case thingy like this:

switch( mapname )
{
case "mp_map_a":
	// spawn trigger of this map
	break;
 
case "mp_map_b":
	// spawn trigger of this map
	break;
 
default:
	// do something when the map is none of the above
	break;
}
0

Share this post


Link to post
Share on other sites

Thanks Bear!

You helped a lot.

I now made this function:

spawnTheTrigger( x, y, z, radius, height )
{
	trig = spawn("trigger_radius", (x ,y ,z ), 0, radius, height );
}

Do you know if its possible to make a square from the trigger?

So when you give 4 points that will be the corners of the trigger?

0

Share this post


Link to post
Share on other sites

Next time learn the basics in place of asking every single detail to us while you just started today or yesterday..

 

http://wiki.modsrepository.com/index.php?title=Call_of_Duty_4:_mapping_mp

Next time read what he says please before giving false information, look below, i've highlighted the important parts.

 

 

I'm gona try to fix maps that dont have a "endmap_trig" trigger.

But i can't find any scripts with something like spawn("trigger_multiple", (0,0,0 ), 0, 0, 0 ); in it.

and if you know do you also know how to give it a targetname? ( endmap_trig )

 

 

 

Thanks Bear!

You helped a lot.

I now made this function:

spawnTheTrigger( x, y, z, radius, height )
{
	trig = spawn("trigger_radius", (x ,y ,z ), 0, radius, height );
}

Do you know if its possible to make a square from the trigger?

So when you give 4 points that will be the corners of the trigger?

You cannot make a square through script on CoD4, this is why trigger_radius will only work as its not a square it's a cylinder sphere.

 

If you look in the braxi\_maps.gsc you can find loads of examples of end_map triggers which you can also add too.

0

Share this post


Link to post
Share on other sites

 

You cannot make a square through script on CoD4, this is why trigger_radius will only work as its not a square it's a sphere.

trigger_radius is a cylinder afaik? :o

0

Share this post


Link to post
Share on other sites

trigger_radius is a cylinder afaik? :o

swear it was a sphere shape because when ever i've made a collision trigger, i always go down it like it's a sphere. oh well i guess i'm just a nub :>

0

Share this post


Link to post
Share on other sites

Next time learn the basics in place of asking every single detail to us while you just started today or yesterday..

 

http://wiki.modsrepository.com/index.php?title=Call_of_Duty_4:_mapping_mp

 

You've been mapping for about 2 years and you still don't know the basics of scripting, making posts asking for help on almost everything, it makes us all sit back and laugh at you. 

 

 

:dumb: The irony tho :dumb:

0

Share this post


Link to post
Share on other sites

swear it was a sphere shape because when ever i've made a collision trigger, i always go down it like it's a sphere. oh well i guess i'm just a nub :>

 

Img - In Radiant you cannot make it larger by just moving the mouse like the other triggers, but there are 2 Keys/values, that let's you change these settings (height/radius)  :)

0

Share this post


Link to post
Share on other sites

Next time read what he says please before giving false information, look below, i've highlighted the important parts.

 

 

 

You cannot make a square through script on CoD4, this is why trigger_radius will only work as its not a square it's a sphere.

 

If you look in the braxi\_maps.gsc you can find loads of examples of end_map triggers which you can also add too.

 

Thanks a lot Lossy!

Found an new shorter way of adding the triggers in the _maps.gsc

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0