hurt_trigger questions (screenshots)
Moderator: Core Staff
hurt_trigger questions (screenshots)
In a map I'm making I have a passage where there are columns moving up and down. (see the screenshots)
http://jamesgrubb.net/cod/screenshots/shot0000.jpg
http://jamesgrubb.net/cod/screenshots/shot0001.jpg
I'd like for the bottom of the column to have a hurt_trigger on it so that if you're caught under it when it comes down you're killed. Any ideas on how I can do that? I thought about making a trigger that moves up and down along with the column, but I found out you can't move triggers like they're brush models.
http://jamesgrubb.net/cod/screenshots/shot0000.jpg
http://jamesgrubb.net/cod/screenshots/shot0001.jpg
I'd like for the bottom of the column to have a hurt_trigger on it so that if you're caught under it when it comes down you're killed. Any ideas on how I can do that? I thought about making a trigger that moves up and down along with the column, but I found out you can't move triggers like they're brush models.
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Simply make the trigger_hurt and give it a targetname. You can then turn it on and off with the following
Code: Select all
(entity) thread maps\mp\_utility::triggerOff();
(entity) thread maps\mp\_utility::triggerOn();
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]
Re: hurt_trigger questions (screenshots)
I'm still very new at scripting. How would that work?
btw, all the scripting I know I learned from your map nm_trap.
btw, all the scripting I know I learned from your map nm_trap.
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Its very simple, here is a quick example.
Code: Select all
column_kill()
{
kill_trig = getent ("kill_trigger","targetname"); // Hurt Trigger
column = getent ("column","targetname"); //Script Brushmodel
kill_trig thread maps\mp\_utility::triggerOff(); //Turn the trigger off at the start
while(1)
{
column moveZ(bla,bla,bla); //Make sure that there is 72 units before turning the trigger on, or the column will glitch
column waittill ("movedone");
kill_trig thread maps\mp\_utility::triggerOn(); //Turn on
column moveZ(bla,bla,bla); //Finish moving the column till the floor.
column waittill ("movedone");
kill thread maps\mp\_utility::triggerOff(); //Turn off
column moveZ(bla,bla,bla); //Move the column back to the top
column waittill ("movedone");
}
}
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]
Re: hurt_trigger questions (screenshots)
Awesome! I figured it out today at work, but I'm sure I would have had problems writing the code.
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Ok, this works great!
The only thing that I have a problem with is when the brush stops moving and turns the trigger on the brush pauses for a second. Is there anyway to make it move seamlessly?
The only thing that I have a problem with is when the brush stops moving and turns the trigger on the brush pauses for a second. Is there anyway to make it move seamlessly?
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Yes yes it looks itNightmare wrote:Its very simple
Re: hurt_trigger questions (screenshots)
Could you post your code? I am thinking it probably has something to do with your timing.
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]
Re: hurt_trigger questions (screenshots)
Code: Select all
column_kill1()
{
kill_trig1 = getent ("kill_col1","targetname"); // Hurt Trigger
column1 = getent ("col1","targetname"); //Script Brushmodel
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn the trigger off at the start
while(1)
{
column1 moveZ(-24,1,0.5); //Make sure that there is 72 units before turning the trigger on, or the column will glitch
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOn(); //Turn on
column1 moveZ(-72,1); //Finish moving the column till the floor.
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn off
column1 moveZ(96,1,0.5); //Move the column back to the top
column1 waittill ("movedone");
}
}
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Code: Select all
column_kill1()
{
kill_trig1 = getent ("kill_col1","targetname"); // Hurt Trigger
column1 = getent ("col1","targetname"); //Script Brushmodel
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn the trigger off at the start
while(1)
{
column1 moveZ(-24,1); //Make sure that there is 72 units before turning the trigger on, or the column will glitch
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOn(); //Turn on
column1 moveZ(-72,1); //Finish moving the column till the floor.
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn off
column1 moveZ(96,1); //Move the column back to the top
column1 waittill ("movedone");
}
}
There is no default, if no starting speed time is defined it just starts and stops automatically
Btw, be sure you add your map name in front of those targetnames, both in your .map and in your script! This will prevent 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]
Re: hurt_trigger questions (screenshots)
Nope, didn't change it. Still slows or pauses a sec when it completes the first move and turns on the trigger.
What do you mean?Nightmare wrote: Btw, be sure you add your map name in front of those targetnames, both in your .map and in your script! This will prevent conflicting.
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
He means that if the map is in the server with another map that uses the same targetnames then they won't work properly.
ODD
Re: hurt_trigger questions (screenshots)
I should have been able to figure that out. I'll give it a try tomorrow and see if it makes a difference. Either way, thanks for the tip.
I saw a priest kill a cop on TV.
Re: hurt_trigger questions (screenshots)
Code: Select all
column_kill1()
{
kill_trig1 = getent ("kill_col1","targetname"); // Hurt Trigger
column1 = getent ("col1","targetname"); //Script Brushmodel
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn the trigger off at the start
while(1)
{
column1 moveZ(-24,1,0,0); //Make sure that there is 72 units before turning the trigger on, or the column will glitch
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOn(); //Turn on
column1 moveZ(-72,1,0,0); //Finish moving the column till the floor.
column1 waittill ("movedone");
kill_trig1 thread maps\mp\_utility::triggerOff(); //Turn off
column1 moveZ(96,1,0,0); //Move the column back to the top
column1 waittill ("movedone");
}
}
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]
Re: hurt_trigger questions (screenshots)
I tried that before I posted here, but I tried again to be sure and its still the same.
If it would help you I can send you my map files. You'll be getting credits already anyway for helping me with the scripting.
If it would help you I can send you my map files. You'll be getting credits already anyway for helping me with the scripting.
I saw a priest kill a cop on TV.
Who is online
Users browsing this forum: No registered users and 41 guests