Posts
371
Respect
164Add +1
Forum Rank
Perk Hacker
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!Your making this a lot more complicated that it needs to be. You could have just used a trigger_radius and
To determine if a player is touching the trigger or not. All of these distance checks is just nonsense.
Your also calling checkTouchingTrig() without an entity here:
Can't use trigger_radius because I get g-spawn. The functions say trig because I was using triggers at first and I'm too lazy to change their names lol.
Unless your constantly spawning in trigger_radius's like crazy, I can't see how your getting Gspawn. How many triggers is this even for, exactly? What code did you use to spawn them? something like this:
?
At first I was using trigger_multiple and I couldn't even compile the map because I got g-spawn during compiling lol. You can imagine more or less the number (basically I don't know how many they were ).
So I replaced them with structs and made the script to work with them, so there's no need to use trigger_radius at all.
If I don't find any other solution maybe I could try to spawn triggers when the player is near the door, only for the distance check, so I don't have to use the variable. But I don't want to do this because it will make me change more code, probably.
Yes, there is. The way your doing this is messy, stupid, and clearly not working. The reason you had Gspawn at start was probably because you where looping it. You don't even need to use a distance check at all.
If this is *only* for one trigger, this should be about all you need:
Might need to do some tweaking(didn't compile, either), but I can't see any reason why this wouldn't work for what your trying to do.
I couldn't even compile the map because I got g-spawn during compiling
The way I'm doing it is not stupid and does work. The only thing is that a few times somehow one player (never happened to more than one) gets its isTouchingTrig attribute fucked up and it's always true.Wasn't looping anything...
And no, it's not for one trigger. That code will make me have g-spawn.
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. | |
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 |
I think you may be slightly confused. Scripting, unless spawning in ents like you are suggesting, isn't the cause for gspawn. Gspawn typcially occurs when you have too many interactive ents and what you are suggesting is to spawn more ents. He is attempting to relieve his interactive ents by scripting around it. I've done it in ORBiT as well, slightly different. Triggers for me were just the easiest, most used ent that I could get around easily. I'm sorry that is confusing or stupid to you. He did agree that spawning one ent per door if a player is near could be an alternative, and he is completely capable of figuring out that method. He was merely asking for "help" to see if anyone could see the error in his code, he wanted to use.
On a side note, you need to either learn to speak to people or stop trying to help. No matter how much more you think you know, no one will care if you call them stupid, or what they thing they are doing is stupid.
Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. | |
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 |