mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
GFX card profile config file logging moved to debug only
WIP mode of guiSliderCtrl to be a filled rectangle instead of a textured UI Fixed bug with guiTextEditCtrl losing focus updating history passing malformed strings Updated WIP options menu Editor/Project settings WIP Updated editor theme to be consistent, and feed off the editor settings Updated popup menus to reference renamed profiles Added more in-progress modules for examples/stress testing
This commit is contained in:
parent
226529fd1b
commit
f1777016b8
179 changed files with 10144 additions and 415 deletions
1639
Templates/Modules/AI_Guard/Scripts/aiPlayer.cs
Normal file
1639
Templates/Modules/AI_Guard/Scripts/aiPlayer.cs
Normal file
File diff suppressed because it is too large
Load diff
34
Templates/Modules/AI_Guard/Scripts/guardTrigger.cs
Normal file
34
Templates/Modules/AI_Guard/Scripts/guardTrigger.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
function guardTrigger::onEnterTrigger(%this, %trigger, %obj)
|
||||
{
|
||||
echo(%trigger @ " has been triggered!");
|
||||
// we've been triggered. Now check to see if the player triggered the trigger
|
||||
// we don't want other enemies to keep spawing more enemies!
|
||||
%tgtid = AIPlayer::GetClosestPlayer(%trigger);
|
||||
//echo("nearest human is " @ %tgtid);
|
||||
// check to see if the player triggered this.
|
||||
if (%tgtid == %obj)
|
||||
{
|
||||
// if triggerMany is set, then we shouldn't do anything. (or do something different.)
|
||||
// if you want a trigger to always spawn an enemy, set the trigger's triggerMany value to "true"
|
||||
// default behavior is to trigger once.
|
||||
if (!%trigger.triggerMany && !%trigger.doneOnce)
|
||||
{
|
||||
|
||||
// set the spawnGroup variable to pass on to the spawn function
|
||||
%spawnGroup = %trigger.spawnGroup;
|
||||
|
||||
// let the game know we've already been triggered once.
|
||||
%trigger.doneOnce = true;
|
||||
|
||||
// spawn the group
|
||||
AIPlayer::spawnByGroup(%spawnGroup);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// we've been triggered before. Don't do anything
|
||||
// If you wanted to do something different, this is where you would put it.
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue