Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision: Too Many Entities with Many Areas
Apfel Offline
Junior Member

Posts: 19
Threads: 3
Joined: Jun 2011
Reputation: 1
#2
RE: Collision: Too Many Entities with Many Areas

(10-03-2011, 01:07 PM)Tanshaydar Wrote: Hi;
I have 100 entities and 20 areas. I need every single entity to collide with these 20 areas. So, would something like that work?

AddEntityCollideCallback("Entity_*", "Area_*", "Collision", false, 1);

or do I have to add these collisions one by one?
I'm not sure about how asterix work, but I would do it like this:

for(int i=1; i<=100; i++) {
for(int j=1; j<=20; j++) {
AddEntityCollideCallback("Entity_"+i, "Area_"+j, "Collision", false, 1);
}}


10-03-2011, 01:20 PM
Find


Messages In This Thread
RE: Collision: Too Many Entities with Many Areas - by Apfel - 10-03-2011, 01:20 PM



Users browsing this thread: 1 Guest(s)