
Posts
307
Respect
89Add +1
Forum Rank
Perk Hacker
Primary Group
Scripter
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
main()
{
iprintln ("Objectives");
wait 5;
iprintln ("Take the key!");
trig = getEnt ("key","targetname");
trig setHintString ("Press &&1 to take the key");
trig setCursorHint ("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig waittill ("trigger");
trig Delete();
iprintln ("Objective complete");
}
main()
{
iprintln ("Objectives");
wait 5;
iprintln ("Take the key!");
trig = getEnt ("key","targetname");
trig setHintString ("Press &&1 to take the key");
trig setCursorHint ("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig waittill ("trigger");
trig Delete();
---> Delete model here <---
iprintln ("Objective complete");
}
![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Either associate the trigger as a target to the model or set another targetname for it and delete it.
(ent.target = trigger, ent = model)
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
trig = GetEnt ("key","targetname");
model = GetEnt(trig.target, "targetname");
/* ... other code ... */
trig delete();
model delete();

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
model = GetEnt( "key_model", "targetname" );
model Delete();![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
So when I use the trigger with the targetname "key" the model with the targetname "key1" will delete.
-fanmagic.
main()
{
iprintln ("Objectives");
wait 5;
iprintln ("Take the key!");
trig = getEnt ("key","targetname");
trig setHintString ("Press &&1 to take the key");
trig setCursorHint ("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig waittill ("trigger");
trig Delete();
//---> Delete model here <---
model = getent("key1", "targetname");
//would suggest this if using static kvps, cause I've seen people have frustrating issues which this will make easier to find.
//model = getentarray("key1","targetname")[0];
if(isdefined(model)) model delete();
iprintln ("Objective complete");
}
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
