673f9bbab8524

673f9bbab96c9
1 Guest is here.
 

Topic: Any way to move enemies at runtime? Read 1201 times  

673f9bbab9d05sarge945

673f9bbab9d71
While working on the Randomiser, I decided that I would like to be able to change-up the enemy placement.

However, upon moving enemies around, I have found that they turn invisible, are incorporeal, and can still attack me. For instance, laser turrets that have been moved will be able to shoot lasers out of thin air, even though I can't see or interact with the turret in any way.

The MONO console also complains, saying
"Attempt to update physics on an OG-Grenade (390), when non physical!"

Is there some way to make this work?

I am happy to add/remove properties as needed from the enemies.

673f9bbab9ea3voodoo47

673f9bbab9ef7
depends on how are you moving them. when I was trying to dml do this, I have experienced similar issues, the safe way of moving an AI seems to be a teleport trap.

673f9bbab9ff0sarge945

673f9bbaba03f
I am trying to do it by simply changing their position/heading.

How would I do this with a teleport trap? Despite my extensive use of Squirrel, I haven't really played with Traps much (or NVscript in general). Can you point me in the direction of some examples within the game?

I feel like creating one of these for every single enemy might be a really terrible idea.

673f9bbaba116voodoo47

673f9bbaba162
I would simply NVCreateAndLink the teleport trap upon BeginScript and trigger it a second later, but squirrel probably can do it in a smarter way. kind of depends on what exactly you want to do (if you just want them to face a certain direction, then there is a prop for that, AI/Ability Settings/Idling Directions, pretty sure you can add/remove/set it using squirrel).

but generally, if you can leave the AIs alone, then you should.

673f9bbaba24bsarge945

673f9bbaba297
Well I am trying to make them randomise to new spots, so that encounters can happen differently, turrets can appear in other places, etc.

So I will need to fully move them.

I will look through the documentation for more ways to do this in squirrel, and in the worst case, can dynamically create teleport traps (I am already dynamically creating email triggers for the crystal shard and Toxin A, so that the new triggers follow the new locations).

Interestingly, Psi Reaver brains seem to be movable just fine.

Thanks for all your help.

673f9bbaba328voodoo47

673f9bbaba377
probably because they are more of an object than an actual AI.

sure thing.

673f9bbaba47asarge945

673f9bbaba4eb
SO it turns out, teleporting enemies around actually works fine.

I'm just an idiot.

Protip: Putting enemies in containers breaks the engine
Acknowledged by: RoSoDude

Your name:
This box must be left blank:

A familiar door code with 3 digits:
1 Guest is here.
Those who believe in telekinetics, raise my hand.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673f9bbabdb91