Going Bald cos of a trigger issue

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Fragmagnet
Private
Posts: 3
Joined: Thu May 27, 2004 1:30 pm

Going Bald cos of a trigger issue

Post by Fragmagnet »

Hi all,

I know i'm gonna sound like a complete n00b :D Well i guess i am as far as scripting goes, but i gotta ask a question about triggers for a bomber run i want to activate on a player passing through a trigger.

I've looked at all the tuts on triggers and bombers and global strafing and searched the forums for relevent triggering info, but i'm still at a loss.
I've even dismantled the example maps and tried to duplicate but i can't get it to work.

I can make the plane fly, loop, barrel roll, and all sorts, but i can't make it work with a trigger_multiple.

Here's the set up.

I have a set number of splinepaths tracking across the map for the plane's path. I have set all the variables and tested it in another test area and set it to run shortly after spawn and i see the plane fly overhead :D So the planes fine....

i set a trigger up using right click context menu, entered data thusly:

#set /2
$targetname / bomber_trig <--- this triggers name
classname / trigger_multiple
setthread / bomber1 <---thread name in scr file
target / bomberpath <--- this is the first splinepath name

when this info is set, a red line appears between the trigger and the splinepath, this i take it means they are linked.



Below is a copy of my .scr file i'm using.....


main:

setcvar "g_obj_alliedtext1" "Testing bomber path"
setcvar "g_obj_alliedtext2" "with"
setcvar "g_obj_alliedtext3" "trigger"
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

exec global/DMprecache.scr
exec global/ambient.scr random
exec global/exploder.scr

level waittill spawn

thread random_explode_start
thread bomber1

end


random_explode_start:

thread random_explode1
thread random_explode2
thread random_explode3
thread random_explode4

end

random_explode1:

wait (randomfloat 13 + 16)
$random_explode1_origin playsound leadinmp
wait 1
$random_explode1 anim start
radiusdamage $random_explode1_origin 256 384
goto random_explode1

end

random_explode2:

wait (randomfloat 7 + 14)
$random_explode2_origin playsound leadinmp
wait 1
$random_explode2 anim start
radiusdamage $random_explode2_origin 256 384
goto random_explode2

end

random_explode3:

wait (randomfloat 5 + 8)
$random_explode3_origin playsound leadinmp
wait 1
$random_explode3_origin playsound leadinmp
$random_explode3 anim start
radiusdamage $random_explode3_origin 256 512
goto random_explode3

end

random_explode4:

wait (randomfloat 8 + 12)
$random_explode4_origin playsound leadinmp
wait 1
$random_explode4 anim start
radiusdamage $random_explode4_origin 256 480
goto random_explode4

end



bomber1:

$bomber_trig waittill trigger
$bomber_trig start
exec global/ambient.scr plane
end


Now, i've been playing with this script for about a week and a half and i must say, i'm going bald from the stress of it...please, help, i don't have much more hair left!!!


Here's a quick description of what i had in mind...

A solider runs through a gate and sets off the trigger which either waits 15 secs or starts the plane flying stright away ( maybe random time limit within a 20 sec time frame here ) This then hopefully works out that by time the soldier has entered the compound, the plane will then fly overhead, and perform a barel roll over the compound, from this point i can script and create further events, but geezz.. i know it's lame, i'm a total n00b, i need help :) I just can't deal with this damn trigger :(

Strangly, i had no problems with barbwire triggers for hurting players. just trigger activating a thread with in the main .scr file or should i put the bomber stuff into a seperate .scr file???

Thank in advance for any pearls or wisdom :)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

exec global/bomber.scr

Post by tltrude »

There is a bomber script in pak0.pk3/global. It has a mini tutorial right in the file itself.

==========================================
// Plane/bombing system created by Mackey McCandlish.
//
// Before level waittill spawn "exec global/bomber.scr".
//
// Used in m3l3, m4l0, m5l1a, m5l1b, m5l3, m3l3, training, and maybe someplace else, who can say? (One of the DM levels too).
//
// Created a info_splinepath and click model and choose the plane you want to use. Choose one that ends with fly.tik.
//
// Copy the info_splinepath into a big line of them, of where you want the plane to fly through space.
//
// Link them all together.
//
// Give the first one a targetname of "bomberpath"
//
// Set this one's $mdl value to be equal to its model value.
//
// Rotate each individual info_splinepath. The way its rotated will determine what position the plane will be in when it flies
// through that point in space.
//
// You can set the "speed" key to multiplicably values. This defaults to 1. If you think 1 is too fast, set all the splines
// to a .speed of 0.5. Or set half of them to 0.5, and for that half the plane will fly at half speed.
//
// You can make the planes drop bombs by setting up similar paths using the model "ammo/us_bomb.tik", and the first spline
// on the path has targetname "bomber".
//
// Both the "bomber" and the "bomberpath" entities are given the same #set value, to associate them. You can give the bombers
// a $setthread value to make them run a thread in the level.script upon impact. They automatically do an explosion when they
// reach the end of their path.
//
// You can make triggers for the bombers with "trigger_multiple"s that have a targetname "bombertrigger" and the same #set
// number as the bomberpath, or you can do "thread global/bomber.scr::bomb #" where # is the #set number in question.
===============================================

If you still have questions about it, please just ask again. Btw, when it talks about "bomber" it is refering to the bomb path and not the plane path. Placing a setthread in the first bomb node, will run the thread when the bomb reaches the last bomb node (comes in handy for setting off exploders).
Last edited by tltrude on Thu May 27, 2004 2:39 pm, edited 1 time in total.
Tom Trude,

Image
Fragmagnet
Private
Posts: 3
Joined: Thu May 27, 2004 1:30 pm

Post by Fragmagnet »

waaayheeey :D thanks, i never knew that was on my machine all along :P
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

msot of teh global scripts have mini tuts in them, otherwise .map may still be trying to figure out how to spawn. :lol:
if you ever need to look something up, check the script.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

A quote from the global/strafe.scr in case you are interested
. Give all the nodes of the "strafe_path" the same #set value .
//
// You can make triggers for the strafe with "trigger_multiple"s that have a targetname "strafetrigger"
//
// and the same #set number as the strafe_path ,or you can do: thread global/strafe.scr::strafe #
Image
Fragmagnet
Private
Posts: 3
Joined: Thu May 27, 2004 1:30 pm

Post by Fragmagnet »

Well, after some modification, some swift reverent praying to the map gods, a few sacrafices not to mention purchasing more hair tonic, i've come to the conclusion i have no idea what i'm doing anymore.

I've made everything fall in line, all targets are labeled, triggers point to first anim, i even trid using a script origin to nudge it along, but to no avail. The tuts i found :D were helpful, but seeing as i can't get the bomber to fly on trigger command, i'm just thinking maybe i should just make it a random event :( I can't figure it out :( driving me insane :cry:
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Do you think this may work:

$bomber fly $last_splinepath

Don't know if it's that simple. :?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

planes

Post by tltrude »

It should not be giving you that much of a problem. If all else fails, you can just copy a plane path, bomb path, speaker and trigger from my test_bomber tutorial map. Also, check for explosion enities and script lines that may go with it.

http://smallsumo.leveledit.com/tltrude/index.html
Tom Trude,

Image
Post Reply