How to lock unit movement

Post Reply
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

How to lock unit movement

Post by ParaworldFan »

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?
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

Have you tried hold position stance?
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

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?
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

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."
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

Ah I see. I forgot to mention that described their unit is as controlled only.
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

hmm, i don't fully understand that sentence (bad translation?)
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

No, my damn auto changing changed “AI to as”. I meant the units, I can’t control them, it’s controlled by AI (bot)
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

Changing it's stance still works through trigger, but it must also be prevented that AI commands it to go anywhere else.
hmm...
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

Yes, that’s the main problem, prevent ai to command it to chase escaping enemy.... and assault with others
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

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
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

and/or you can try use "AILU" trigger action on that unit
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: How to lock unit movement

Post by AnthonyCole »

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. :P Maybe there's a "teleport unit to position" trigger action you can do if it does glitch away from there.
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

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. :P Maybe there's a "teleport unit to position" trigger action you can do if it does glitch away from there.
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...
User avatar
Zidell
- Dragon Clan -
- Dragon Clan -
Posts: 268
Joined: Tue Mar 24, 2015 13:53 pm

Re: How to lock unit movement

Post by Zidell »

Isnt it easier to make a region, and when a unit leaves it, send it back?
Image
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

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?
Suggested that already. I am afraid, visually it will be seen that unit teleports each time back on position and trying to escape that....
User avatar
Zidell
- Dragon Clan -
- Dragon Clan -
Posts: 268
Joined: Tue Mar 24, 2015 13:53 pm

Re: How to lock unit movement

Post by Zidell »

You dont need to teleport this unit, use go to point action
Image
User avatar
Zidell
- Dragon Clan -
- Dragon Clan -
Posts: 268
Joined: Tue Mar 24, 2015 13:53 pm

Re: How to lock unit movement

Post by Zidell »

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
Image
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

try out combining set stance (AIAM) and ai lock unit (AILU) actions, i'm curious what happens
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

It worked!!! YAY
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

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.
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

there is a new stance for that (the one with the "Zzz" icon) which prevents unit from fighting, even if it has been attacked
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

Henry.....Ai controlled unit, not the player ones
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

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)
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to lock unit movement

Post by ParaworldFan »

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
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to lock unit movement

Post by MrMorgana »

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
Post Reply

Return to “English”