colliding entities


(Zer0Cool) #1

Is it possible to check if 2 entities are colliding? For example i have a script mover which moves randomly and if it collides with an other entity like for example another script_mover, it should trigger smth in script. Anyone an idea? :X


(-SSF-Sage) #2

If you mean like touch, not directly. Tho you can do it by triggering something in the script, when it has completed a spline. Moving really randomly doesn’t work. You always have to define a path for the mover.

For example the tank hits the wall in goldrush. When the current spline is finished, it triggers the wall to blow. Everything has to be timed/staged.


(Zer0Cool) #3

well, thats the point, with “setposition” i dont have to define a path. isbowhten used it for his shields, which can move almost everywhere. In his case it is a shield, so it doesnt look wierd when a part of it disappears in a wall or smth, but if i would have smth like a tank, it wouldnt work.


(-SSF-Sage) #4

It’s still not a random route. You can trigger in random time or randomly choose the predefined locations. You still define the path. Well anyway, you can trigger the “colliding” with that too.

Ps are you sure you aren’t talking about gotomarker, since you can’t define speed or etc. to setposition afaik. If yes, then you just put in the wait to the line and in the next line you trigger the “colliding”. With the wait stage in the gotomarker command, you can make it always trigger in right time. Then g_moverspeed won’t affect it. It would afaik, if you timed it with wait xxx.


(Zer0Cool) #5

you know how the shields are working? you have a script_mover with attached entities around it. if the shield is triggered it will move with setposition to one of the origins of the attached entities. so you can move it without a path. but with this technic it can move through other brushes like walls or whatever and thats what i dont want.


(-SSF-Sage) #6

Put how do you choose speed etc. ? It is still routing your path, so you can add “markers” to go around obstacles. Or put a marker in front of the obstacles, make it explode or w/e when it starts moving from that marker. I haven’t seen it working rly.


(Zer0Cool) #7

there is just one speed,it is like teleporting from one point to another and so on, but the distance is so short that it looks like moving.
how should i make them explode when i dont know when its next to it?
the best would be if you take a look at the shield-map to see how it works and what i mean :slight_smile:


(-SSF-Sage) #8

Place a marker just in front of the obstacle. When it reach that and starts moving on forward, trigger the obstacle to explode.


(Zer0Cool) #9

what do you mean with marker?


(-SSF-Sage) #10

Setpositions destiny. An entity with the targetname it goes to.


(Zer0Cool) #11

the destiny is one of its own with tags attached entities, which can be used several time before it comes near to an obstacle.


(isbowhten) #12

yes it is not a path it is a freely chosen way with a special “unit” of length … difference between tags of the outside and tag of the middle … some 20 units or whatever it was .
well and i really used gotomarker but with soooooo mcuh speed that xyou can say it was setposition.
i wanted to use setposition but it allowed ppl to walk inside the shield form outside as for a short while, when the shield teleports you dont get blocked

you always can walk (horizontal) in one of 8 directions in a length that is about one step with your player.
it could not have been made perfect in radiant ofc… you know … circles and Pi etc…
ah yes and one thing more:
i dont have 8 entities for 8 directions, i have 1 entity that is “setposition” to the trigger_multiple


(-SSF-Sage) #13

That’s quite neat idea! I think the only way to stop it going through the objs, is to have a trigger_multiple in front of the obstacles forcing it to move other direction, but this as you probably know is not rly a valid solution. If the player can control it’s directions “freely” I think there’s no other choices than drop the idea. Atleast I can’t come up with a solution right now, unless you want to script each wall and crate to be noticed.

Edit. Ps if you used this for somekinda vehicle, wouldn’t the map need to be flat aswell? It looks weird if the tank sinks too much in a hill slope. And it would not rotate. It would float like a ghost.


(isbowhten) #14

yeah this is the point…
if i knew a solution about that i would make a car-race :stuck_out_tongue:
however, all ideas are welcome !


(kamikazee) #15

Too bad W:ET script is not as powerful as the scriping offered in the Doom 3 engine…