How to lock unit movement
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
How to lock unit movement
I want to make a Unit which will be standing on unreachable area for units of player (unit can be killed only by range attack) and this unit should always stay in this area and keep firing in its radius, and if player escape it’s range, the unit not chases him... So for short I want unit who act like turret tower, which can rotate, but cannon move and always stand in one point. Any ideas?
Re: How to lock unit movement
Have you tried hold position stance?
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
What do you mean? Are you speaking about making trigger that will force unit back in position as long as it leaves the region, or what?
Re: How to lock unit movement
no, i meant the stances you can also use for units to prevent them going anywhere on their own
from help menu:
"Hold position means that units do not move even when attacked.
However they do fight all units coming within range of their weapons."
from help menu:
"Hold position means that units do not move even when attacked.
However they do fight all units coming within range of their weapons."
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
Ah I see. I forgot to mention that described their unit is as controlled only.
Re: How to lock unit movement
hmm, i don't fully understand that sentence (bad translation?)
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
No, my damn auto changing changed “AI to as”. I meant the units, I can’t control them, it’s controlled by AI (bot)
Re: How to lock unit movement
Changing it's stance still works through trigger, but it must also be prevented that AI commands it to go anywhere else.
hmm...
hmm...
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
Yes, that’s the main problem, prevent ai to command it to chase escaping enemy.... and assault with others
Re: How to lock unit movement
maybe you should do it by changing scape/terrain texture around the unit, so that it is only walkable at the point, where it stands, and around everything unwalkable
so that if the AI would command it to go anywhere else, it wouldn't be able to do so
so that if the AI would command it to go anywhere else, it wouldn't be able to do so
Re: How to lock unit movement
and/or you can try use "AILU" trigger action on that unit
- AnthonyCole
- - Admin -
- Posts: 2134
- Joined: Sat Apr 18, 2009 13:17 pm
Re: How to lock unit movement
Surround the ground it's standing on with unwalkable ground? But it might still glitch off that patch of land, since PW isn't that well programmed. Maybe there's a "teleport unit to position" trigger action you can do if it does glitch away from there.
I've never seen code like this.
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
I agree with AnthonyCole, locking unit on the mountain isn’t working actually. Unit will be able even to leave it on unwalkable textures. And about teleporting....yes I knew that it can be done, but I guess it will be noticed by other players, and the teleporting unit, will be mostly teleport than attack...AnthonyCole wrote: ↑Wed May 06, 2020 7:41 am Surround the ground it's standing on with unwalkable ground? But it might still glitch off that patch of land, since PW isn't that well programmed. Maybe there's a "teleport unit to position" trigger action you can do if it does glitch away from there.
Re: How to lock unit movement
Isnt it easier to make a region, and when a unit leaves it, send it back?
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
Suggested that already. I am afraid, visually it will be seen that unit teleports each time back on position and trying to escape that....ParaworldFan wrote: ↑Mon May 04, 2020 15:27 pm What do you mean? Are you speaking about making trigger that will force unit back in position as long as it leaves the region, or what?
Re: How to lock unit movement
You just need a region about 4 forest blocks in size + aggressive walk action (when it leaves the region) to the place where it should stand
Re: How to lock unit movement
try out combining set stance (AIAM) and ai lock unit (AILU) actions, i'm curious what happens
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
It worked!!! YAY
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
I would ask it here, because it’s still about the same thing: I need unit, which will be in enemy team, but...if it’s sees an enemy unit, it won’t attack it, it’s just stand in position, like neutral unit.
Re: How to lock unit movement
there is a new stance for that (the one with the "Zzz" icon) which prevents unit from fighting, even if it has been attacked
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
Henry.....Ai controlled unit, not the player ones
Re: How to lock unit movement
ParaworldFan... set stance (AIAM) action works for all units, the ones controlled by AI are no exceptions.
(although i don't know now how the leveleditor handles it, if it doesn't contain the new stance to be selected in the droplist, then it will be fixed)
(although i don't know now how the leveleditor handles it, if it doesn't contain the new stance to be selected in the droplist, then it will be fixed)
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to lock unit movement
Action set stance AIAM doesn’t prevent unit to attack enemy, only prevent it to move. Probably if unit close combat fighter it will not do anything, but if it’s a long range unit like, archer it will start shot arrows in enemies, once they will be in its range
Re: How to lock unit movement
how many stances can you select in AIAM action?
3 or 4?
if only 3, then the necessary, new stance is not yet available to be used in trigger
3 or 4?
if only 3, then the necessary, new stance is not yet available to be used in trigger