Trigger and Script Question?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
MillesManson
Corporal
Posts: 48
Joined: Thu Mar 13, 2003 4:54 pm

Trigger and Script Question?

Post by MillesManson »

Hi all,
my english isn?t very good so i hope someone understands me.

I have a part of script which starts by a trigger in my map.
It is a multiple-trigger with the entity setthread OpenShutters.

The Sript part is this one :

OpenShutters:

$stall open $mg42_gunner
$stall delete
//$stall notsolid
$shutters_open show
$mg42 show
$mg42a show
//$mg42_gunner exec global/enable_ai.scr
$mg42_gunner show

end

The trigger and script work fine.
I want that the trigger will not be active when i walk trough,but
when i have entered a jeep an the jeep is driving through the trigger.
For the jeep i have this script:

jeep_enter:
$pilot lookat NULL
$jeep2 thread player_turret
$mission1_ende triggerable
wait 2

$jeep2 drive jeep2_path2 200 60 40 128
wait 2

thread lastsoldiers

$jeep2 waittill movedone
$jeep2 waittill movedone
$jeep2 waittill movedone
thread jeep_end
end

This script also work correct, but the problem is that the trigger gets active when i walk through befor i have entered the jeep.

Do i need an other Trigger for that, or can i activate the trigger in the jeep script, so that the "OpenShutters- scrpitpart" don?t start before when i walk trough?

Thx everybody for help!
Greetz Milles
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Use nottriggerable and triggerable commands to turn your trigger 'on' at the right time.

Example:

At map startup -> $[triggername] nottriggerable
(you can also add this as a key without value in Radiant)

When the jeep is entered -> $[triggername] triggerable

Good luck :)
Image
User avatar
williewisp
First Lieutenant
Posts: 208
Joined: Fri May 16, 2003 1:10 pm
Location: ireland

Post by williewisp »

you cud use another trigger, and put it in the jeep.

give the trigger in the game a targetname
targetname shutters (or whatever you want / this is the trigger for the shutters

using the trigger in the jeep. have it
setthread activte_trigger

top of script or somewhere in it
$shutters nottriggerable

the thread called from the trigger in the jeep
activte_trigger:
$shutters triggerable
end

there is prob an easier way?
it's not a time for thinking its a time for drinking!
User avatar
MillesManson
Corporal
Posts: 48
Joined: Thu Mar 13, 2003 4:54 pm

Post by MillesManson »

Wow i like this forum,
fast help!

Thx jv_map it?s working!

Greetz Milles
Post Reply