
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
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! function init()
{
level.buttonNeeded = 1;
level.buttonFound = 0;
level thread button();
}
function button()
{
model_teleport_1 = GetEnt("teleport_model_1", "targetname");
trig_1 = GetEnt("button_1", "targetname");
model_1 = GetEnt("button_model_1", "targetname");
trig_1 SetHintString("");
trig_1 SetCursorHint("HINT_NOICON");
while(1)
{
trig_1 waittill("trigger", player);
level.buttonFound++;
IPrintLn("Button found!"); // Not Needed
thread button_found(player);
break;
}
//trig_1 Delete();
//model_1 Delete();
}
function button_found(player)
{
while(1)
{
self waittill(level.buttonFound >= level.buttonNeeded);
if(level.buttonFound == level.buttonNeeded)
{
self MoveTo("teleport_model_1", .5, .05, .05);
IPrintLn("round2");
player_fudge_moveto( teleport_model_1 );
}
break;
}
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
I want to make a script where you have to shoot something and then eleport to the next room.
Any help?![]()
This is what i have so far... Code SnippetPlaintextfunction init()
{
level.buttonNeeded = 1;
level.buttonFound = 0;
level thread button();
}
function button()
{
model_teleport_1 = GetEnt("teleport_model_1", "targetname");
trig_1 = GetEnt("button_1", "targetname");
model_1 = GetEnt("button_model_1", "targetname");
trig_1 SetHintString("");
trig_1 SetCursorHint("HINT_NOICON");
while(1)
{
trig_1 waittill("trigger", player);
level.buttonFound++;
IPrintLn("Button found!"); // Not Needed
thread button_found(player);
break;
}
//trig_1 Delete();
//model_1 Delete();
}
function button_found(player)
{
while(1)
{
self waittill(level.buttonFound >= level.buttonNeeded);
if(level.buttonFound == level.buttonNeeded)
{
self MoveTo("teleport_model_1", .5, .05, .05);
IPrintLn("round2");
player_fudge_moveto( teleport_model_1 );
}
break;
}
}
function button()
{
model_teleport_1 = GetEnt("teleport_model_1", "targetname");
trig_1 = GetEnt("button_1", "targetname");
model_1 = GetEnt("button_model_1", "targetname");
trig_1 SetHintString("");
trig_1 SetCursorHint("HINT_NOICON");
trig_1 waittill("trigger", player);
IPrintLn("Button found!"); // Not Needed
//level.buttonFound++; ?
player SetOrigin( model_teleport_1.origin );
PrintLn("round2");
//player_fudge_moveto( teleport_model_1 );
}