Post: flag not spawning...again
05-03-2016, 07:57 PM #1
seanhellen
Are you high?
(adsbygoogle = window.adsbygoogle || []).push({}); dammit its happening again. Things work for 1 function and not another. i have a bunker and a spawnflag function which works perfectly. I try it with a small moving platform and it wont spawn the flag using exactly the same function Mystery

    
Platform()
{
//make platform...this bit works

self waittill("weapon_fired");

SpawnGroundFlag(self.origin);//Here's the problem
wait 1;
self thread ToPlatform();
}

SpawnGroundFlag(origin)
{
level.GFlag = spawn("script_model", origin);
level.GFlag.angles = (0, 0, 0);
level.GFlag setModel("mp_flag_green");
return GFlag;
}

ToPlatform()
{
for(;Winky Winky
{
foreach(player in level.players)
{
if(distance(player.origin, level.GFlag.origin) < 70)
{
player setorigin(Plat.origin);
}
}
wait 0.01;
}
}


I have tried with/without the return GFlag; part (bunker works without it)

I know this is gonna be easy and I'm gonna kick myself for not noticing it, but it is really bugging me Happy
(adsbygoogle = window.adsbygoogle || []).push({});
05-03-2016, 09:12 PM #2
HiddenHour
I defeated!
Originally posted by seanhellen View Post
dammit its happening again. Things work for 1 function and not another. i have a bunker and a spawnflag function which works perfectly. I try it with a small moving platform and it wont spawn the flag using exactly the same function Mystery

    
Platform()
{
//make platform...this bit works

self waittill("weapon_fired");

SpawnGroundFlag(self.origin);//Here's the problem
wait 1;
self thread ToPlatform();
}

SpawnGroundFlag(origin)
{
level.GFlag = spawn("script_model", origin);
level.GFlag.angles = (0, 0, 0);
level.GFlag setModel("mp_flag_green");
return GFlag;
}

ToPlatform()
{
for(;Winky Winky
{
foreach(player in level.players)
{
if(distance(player.origin, level.GFlag.origin) < 70)
{
player setorigin(Plat.origin);
}
}
wait 0.01;
}
}


I have tried with/without the return GFlag; part (bunker works without it)

I know this is gonna be easy and I'm gonna kick myself for not noticing it, but it is really bugging me Happy


Try replacing self.origin with self getorigin() in your platform() function.
05-03-2016, 09:21 PM #3
seanhellen
Are you high?
Yep tried that one too Happy didnt work either
05-03-2016, 09:38 PM #4
HiddenHour
I defeated!
Originally posted by seanhellen View Post
Yep tried that one too Happy didnt work either


Use this function to spawn the flag
    SpawnGroundFlag(origin)
{
GFlag = spawn("script_model", origin);
GFlag.angles = (0, 0, 0);
GFlag setModel("mp_flag_green");
return GFlag;
}

And put this in the place of SpawnGroundFlag(self.origin);//Here's the problem
    level.GFlag = SpawnGroundFlag(self.origin);

P.S. Use the quote function mane
05-03-2016, 09:42 PM #5
seanhellen
Are you high?
Originally posted by TheHiddenHour View Post
Use this function to spawn the flag
    SpawnGroundFlag(origin)
{
GFlag = spawn("script_model", origin);
GFlag.angles = (0, 0, 0);
GFlag setModel("mp_flag_green");
return GFlag;
}

And put this in the place of SpawnGroundFlag(self.origin);//Here's the problem
    level.GFlag = SpawnGroundFlag(self.origin);

P.S. Use the quote function mane


Lol will give that a whirl. Thanks Smile
05-03-2016, 09:47 PM #6
HiddenHour
I defeated!
Originally posted by seanhellen View Post
Lol will give that a whirl. Thanks Smile


Be sure to let me know if it works ayy lmao
05-03-2016, 09:51 PM #7
seanhellen
Are you high?
Originally posted by TheHiddenHour View Post
Be sure to let me know if it works ayy lmao


Will report back tomorrow :yes:
05-04-2016, 07:46 PM #8
seanhellen
Are you high?
Originally posted by TheHiddenHour View Post
Be sure to let me know if it works ayy lmao


Hi - ok it didn't work in my test gsc, but I have put the platform back into my menu and my original way worked...I don't know either :\ Thanks anyways :yes:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo