Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!

Ship Environment output players

StarkkzStarkkz Posts: 17Registered
edited April 2014 in Suggestions #1
It'd be nice if the ship environment entity could output which players are in it, it could be used for advanced targeting systems that would disable targeting on players that are in your station or ship, and so you would be able to target players and cores without targeting allies.
Post edited by Unknown User on


  • SteeveeoSteeveeo Posts: 849Registered, Administrator
    You can just do what the Ship Environment does to see if you're in the ship instead. The Ship Environment puts a variable on every constrained prop, then traces above and below each player once per second, checking if the hit entities have said variable (and they match).

    Now, E2 has no access to the Ship Environment's variable, but it DOES have access to the core's through the use of E:getCoreEnt(). So, once per second, send a trace up and down from each player, and each player that has both Trace:hitEntity():getCoreEnt() returns match will be "inside" your ship.
  • StarkkzStarkkz Posts: 17Registered
    Very smart, I guess I'll do that. However it would still be nice if the entity outputed this, because doing it from E2 would tend to increase the ram usage (maybe slightly) rather by getting it directly from the entity.

Leave a Comment

Drop image/file