
Posts
31
Respect
Forum Rank
Legless Crawler
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 light(player)
{
light = GetEnt("targetname","light_a");
light EnableLinkTo(player);
light LinkTo(player);
}
While true do
light.origin = player.origin + (0, 0, Y)
light.angles = player.angles
Wait(0.1) -- wait might only work with numbers higher then 0.1
End
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
light = GetEnt("targetname", "light_a");
//This is asswards ^
//Proper way
light = GetEnt("light_a", "targetname");
light EnableLinkTo(player);
//This is wrong ^
//EnableLinkTo doesn't take any arguements
//Right way
light EnableLinkTo();
//then
light LinkTo(entity)
#precache("fx", "name_of_fx_file");
#namespace FXlightFollower;
function init(){
level._effect["fx_light"] = "name_of_fx_file";
}
function fx_light(){
FXtrig = GetEnt("fxlight", "targetname");
FXtrig SetCursorHint("HINT_NOICON");
FXtrig SetHintString("Press &&1 to summon light fx");
FXtrig waittill("trigger", player);
fx_follower = Spawn("script_model", player.origin + (0, 0, 80));
fx_follower SetModel("tag_origin");
PlayFXOnTag(level._effect["fx_light"], fx_follower, "tag_origin");
player.light_follower = fx_follower;
player thread light_follow();
}
function light_follow(){
while(1){
halo = self.origin + (0, 0, 80); //80 units above the player - adjust height as necessary
self.fx_follower MoveTo(halo, .05);
wait(.05);
}
}
//When you're ready to stop the fx, do:
self.fx_follower Delete();
fx,fx_file_name
//In your mapname.gsc
your_fx_script_gsc::init(); //<--Pre-load
zm_usermap::main(); //<-- Main - already in your mapname.gsc
your_fx_script_gsc::fx_light(); //<--Post-load
fx_follower = Spawn("script_model", player.origin + (0, 0, 80));
fx_follower SetModel("tag_origin");
fx_follower EnableLinkTo();
fx_follower LinkTo(player, "tag_origin", (0, 0, 80));
PlayFXOnTag(level._effect["your_fx"], fx_follower, "tag_origin");
//Then do:
fx_follower Delete();
//When you're ready to stop the fx