For loop isn't looping?
I've been trying to create a plugin for TFC that allows players to walk through each other when they are in distance, and also check to see if there are any entities they need to interact with. The best way so far I found to check if players are near entities was to log the entity origins on their spawn, then check later on.
If the players aren't near each other they stay solid. If players are near each other they become not solid. If players are near each other, but also near an interaction entity, they become solid. In the prethink it seems like the second for loop isn't looping. I posted the full code here... http://ampaste.net/19106 Hopefully someone can help me figure this out : / I'm so confused, and my programming abilities aren't that great still. Note: Alot of the code is from around the forum. |
Re: For loop isn't looping?
Not rly the thread question but: Maybe keep them not solid and use force_touch / force_use
|
Re: For loop isn't looping?
If I switched to using that I would still have to use the for loop though? Wouldn't I need to check the origins still?
|
Re: For loop isn't looping?
FM_Touch can get when two people touch each other with no need for loops or other inefficient methods. There is already a plugin for surfmod or something that allows you to go through players so look for that.
|
Re: For loop isn't looping?
I have to say it : NEVER run for loops of 512 in prethink, regardless if it get's executed or not !!!!
This topic (or at least something close to this) was disscussed round here not long ago. http://forums.alliedmods.net/showthread.php?t=55028 Search is your friend :wink: |
Re: For loop isn't looping?
SOLID_TRIGGER /* touch on edge, but not blocking */
sould be able to walk tru, also makes it register touches (not tested) |
Re: For loop isn't looping?
Quote:
Quote:
Quote:
|
Re: For loop isn't looping?
Making players a solid_trigger blew my game up and gave me the error "trigger in clipping list".
|
Re: For loop isn't looping?
I have the same problem, please solution?
|
| All times are GMT -4. The time now is 10:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.