can $object activate trigger?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Wierdo
Corporal
Posts: 47
Joined: Wed Jan 09, 2008 11:15 pm
Location: Winfield, KS

can $object activate trigger?

Post by Wierdo »

Is it possible for an $object to activate a trigger?

Code: Select all

axischeck: 
$axischeck waittill trigger 
if (isTouching ($axis2 || $axischeck)) 
{ 
$axis1 show 
iprintlnbold "Axis possess the Castle." 
} 
else 
{ 
$axis1 hide 
} 
wait 5 
goto axischeck 
end 

Once the flag is at the top of the pole, The team will take the castle.

This is a best case scenerio, as either team can reel the flag back down.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

player

Post by tltrude »

Just use the player that is holding the flag.

if (level.flagman isTouching $axischeck)
Tom Trude,

Image
Wierdo
Corporal
Posts: 47
Joined: Wed Jan 09, 2008 11:15 pm
Location: Winfield, KS

flag

Post by Wierdo »

Just use the player that is holding the flag.
The flag is on a pole in the castle and is a door class object. It will slide into a trigger-multple at the top of the pole. The player at no time actually holds the flag.

I need a means of registering when the flag reaches the top, and one of when it comes back down.
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

hmm, maybe ask bdbodger about his mod in ta, that sounds similar to what you're trying to do...
Image
Wierdo
Corporal
Posts: 47
Joined: Wed Jan 09, 2008 11:15 pm
Location: Winfield, KS

Object trigger

Post by Wierdo »

I figured out a way to make it happen, sorta. :idea: I made an AI and scaled him to .05. I used $flagman hide in the script and made a duplicate flagpole, then placed it in an unused portion of the map. Now, to get it to run, I made the trigger only usable by monsters. The mini - monster rides on the top of the flag, he is blind and deaf, so he just stands there and sets off the triggers.

But if this can be done a better way, I am all for it.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Perhaps
$flagpole touchtriggers ?
Image
Wierdo
Corporal
Posts: 47
Joined: Wed Jan 09, 2008 11:15 pm
Location: Winfield, KS

touchtiggers.

Post by Wierdo »

What are these touchtriggers you speak of? And how would I use one? :?:
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

It's a script command that should make your flagpole capable of touching triggers.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

origin

Post by tltrude »

You don't have to use a door as your flag. You can make it a script_object and move it up and down with a trigger_use and the script.

flag_mover:

$flag_trigger waittill trigger // wait for someone to use the trigger
$flag moveup 100 // how far up to move in units
$flag waitmove // starts it moving and waits until its done
$axis1 show
iprintlnbold "Axis possess the Castle."
$flag_trigger waittill trigger // wait for someone to use the trigger again
$flag movedown 100 // how far down to move in units
$flag waitmove // starts it moving and waits until its done
$axis1 hide
goto flag_mover

end

A trigger_use is triggered by a player hitting his use key. Any brush can be turned into a script_object and a static model can be applied as well, if needed.
Tom Trude,

Image
Post Reply