Staredit Network

Staredit Network -> UMS Assistance -> A unit moove bug
Report, edit, etc...Posted by JaFF on 2006-05-23 at 11:55:21
I'm making a Thing map, & I've encountered the most common bug. It happens when you want to Morph (change forms human-alien; alien-human). I use the usual trigger when you moove a location on the unit & change their places.

A Zergling can come up to walls closer than a Terran unit. So if you come up to a wall in your alien (zergling) form & then morph, your human form will not have enough space, and instead of mooving it a bit away from the wall, it mooves your human form into the middle of the map.

Can this be fixed somehow ?
Report, edit, etc...Posted by Kenoli on 2006-05-23 at 15:54:58
If it can't fit where the zergling was it should not end up in the middle of the map, it should just stay where it was. Did you move it to 'Anywhere' or something?

Since you can't move the terran unit as close to the wall as the zergling, you need to move it somewhere nearby instead. One way to do that is to create another zergling (it will be displaced from the first zergling, and probably not near a wall) and move the terran unit to its location.
It's possible for the second zergling to end up too close to a wall, so you may need to do this multiple times.

Why do you spell move with two 'o's? =\
Report, edit, etc...Posted by fritfrat(U) on 2006-05-23 at 17:02:00
Just use a bigger location, 2x2 or 3x3 or something. Even if the zling gets too close to the wall, the location would be big enough that there would be enough walkable land for the terran unit.
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-23 at 17:08:54
QUOTE(Jammed @ May 23 2006, 10:54 AM)
I'm making a Thing map, & I've encountered the most common bug. It happens when you want to Morph (change forms human-alien; alien-human). I use the usual trigger when you moove a location on the unit & change their places.

A Zergling can come up to walls closer than a Terran unit. So if you come up to a wall in your alien (zergling) form & then morph, your human form will not have enough space, and instead of mooving it a bit away from the wall, it mooves your human form into the middle of the map.

Can this be fixed somehow ?
[right][snapback]491223[/snapback][/right]


Sounds like your attempting to center the location on the zergling after you remove it thus the locaiton would move to the center of the map where you human unit is moved too.

You should post your triggers.
QUOTE(fritfrat @ May 23 2006, 04:01 PM)
Just use a bigger location, 2x2 or 3x3 or something. Even if the zling gets too close to the wall, the location would be big enough that there would be enough walkable land for the terran unit.
[right][snapback]491389[/snapback][/right]


That is a common misconception. The size of a location doesn't reflect the spawning of units in them so changing the size of the location would have no effect.
Report, edit, etc...Posted by Noober on 2006-05-23 at 17:22:41
You could try using the Stop a Unit from leaving a location tutorial here.
Report, edit, etc...Posted by Kenoli on 2006-05-23 at 18:04:37
QUOTE
You could try using the Stop a Unit from leaving a location tutorial here.
He's not trying to stop a unit from leaving a location... What good will that do?
Report, edit, etc...Posted by Noober on 2006-05-23 at 20:14:58
Have a big location that's 1 grid less than the walkeable ground, so that the marine can spawn in the right place.
Report, edit, etc...Posted by Mp)7-7 on 2006-05-23 at 20:26:48
Make some type of location to block the area and if the unit went into that area near the wall and move it a little bit further away and tell them to not go near the wall. Or you could have the unit be made near a location not near a wall!
Report, edit, etc...Posted by JaFF on 2006-05-24 at 03:13:06
My triggers:

Move location
Condition: Allways
Action: Move location X to men owned by current player at "Battle arena"
Preserve Trigger

Morph
Conditions: Switch "Morph" is set
Actions: Move all men owned by current player at Battle Arena to "Backup morph"
Move all men owned by current player at "go here to morph" to X
Move all men owned by current player at "backup morph" to "Pre-morph"
Clear switch "morph"
Preserve trigger

Note:
1.I did not tell all the actions that are not related to moving units
2.I need the switch "morph" becawse there are 2 locations "go here to morph" (I need that so it would work faster)
3.I need "backup morph" becawse the location where your unit is standing before morphing - "Pre-morph" is 1x1 size

Should I try to put the condition "Switch "morph" is cleared" into the move location trigger instead of "allways" ?

It works in general, just this bug sometimes happens. I don't want to create another zergling, becawse:
1.It's should be accurate - you must maintain your position.
2.If the wall is near your zergling, it can create another just as close.... right ?


ADDITION:
It is the Reborn vBlack version. The same bug happens here.
Report, edit, etc...Posted by Gigins on 2006-05-24 at 13:16:37
I got this problem a lot in [GTA classic] because weapon changing system was based on unit moving and whole map was full of places where a unit cannot spawn. So I made few restriction systems. For walls I used something like this...

Make another trigger that detects did the unit morf or not. If it detects that it didn't morph successfully then move back the ling and add a message like "Engine: please move away from wall to morph."
Report, edit, etc...Posted by JaFF on 2006-05-24 at 13:29:18
QUOTE(DEAD @ May 24 2006, 08:16 PM)
I got this problem a lot in [GTA classic] because weapon changing system was based on unit moving and whole map was full of places where a unit cannot spawn. So I made few restriction systems. For walls I used something like this...

Make another trigger that detects did the unit morf or not. If it detects that it didn't morph successfully then move back the ling and add a message like "Engine: please move away from wall to morph."
[right][snapback]491919[/snapback][/right]


Hm, this can help, but there is 1 big problem:

In The Thing game, seconds & even less periods of time may determine win/loss. I imagine: I attack survivors, I gotto morph directly when I'm at 3 HP, not to waist my HP, & then it says "moove away from the wall please". I'm dead sad.gif

A question: can you determine is there a wall near you & in which direction is it with triggers? (maybe use the moovable grid & apply locations somehow) blink.gif
Report, edit, etc...Posted by Gigins on 2006-05-24 at 13:42:39
I know, a perfect way for based on your idea. Can you wait a bit while I make a test map? Really cool idea man. thumbup.gif
Report, edit, etc...Posted by JaFF on 2006-05-24 at 13:44:18
QUOTE(DEAD @ May 24 2006, 08:42 PM)
I know, a perfect way for based on your idea. Can you wait a bit while I make a test map? Really cool idea man. thumbup.gif
[right][snapback]491927[/snapback][/right]


LOL

I didn't expect that smile.gif
Report, edit, etc...Posted by Gigins on 2006-05-24 at 15:38:09
Success!! biggrin.gif

Ok, it does morph Ling to Ultra even if you stand by a wall or in a corner. Ultra to Ling trigger is just basic replace. download and study this map. Well, it's only 1 trigger tongue.gif

If you have problems understanding it, ask away. wink.gif
[attachmentid=18980]
Report, edit, etc...Posted by JaFF on 2006-05-24 at 15:40:51
Thanks a lot, DEAD ! smile.gif I'll go study it. If you want, chech out what are you helping me with in the Maps In Production.

Thanks again biggrin.gif
Report, edit, etc...Posted by Kenoli on 2006-05-24 at 18:14:00
Oh, I thought there was actually a problem. Turns out you can move units next to a wall.

DEAD, you can move an Ultralisk to a Zergling even if it's touching a wall. You knew that of corse, because you used it in your test map.
I just can't figure out why you felt the need to make it so complex. To switch the Zergling to the Ultralisk you move 4 Hero Ultralisks (which are owned by another player) to the Zergling, center a location on one, move the Zergling away, move the Hero Ultralisks away, move the Ultralisk (which is owned by yet another player) to the new location, and then finnaly give it to Player 1.
You could have simply done it like this:

Conditions
*Player 1 brings exactly 0 'Move this to morph' to 'Morph command'.
*Current Player brings at least 1 Ling to 'Field'.
Actions
*Preserve Trigger.
*Comment:Ling -> Ultra
*Move 1 'Move this to morph' for Player 1 at 'Anywhere' to 'Morph command'.
*Center location labeles 'Unit' on [men] owned by Player 1 at 'Field'.
*Move 1 Ultra for Player 1 at 'Morph units' to 'Unit'.
*Move 1 Ling for Player 1 at 'Unit' to 'Morph units'.
Report, edit, etc...Posted by Element-Nature on 2006-05-24 at 22:00:07
Well that took alot over almost nothing didnt it?
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-24 at 22:34:14
QUOTE(Noober @ May 23 2006, 07:14 PM)
Have a big location that's 1 grid less than the walkeable ground, so that the marine can spawn in the right place.
[right][snapback]491551[/snapback][/right]

QUOTE((U)Bolt_Head @ May 23 2006, 04:08 PM)
That is a common misconception. The size of a location doesn't reflect the spawning of units in them so changing the size of the location would have no effect.
[right][snapback]491396[/snapback][/right]




QUOTE(Kenoli @ May 24 2006, 05:13 PM)
Oh, I thought there was actually a problem. Turns out you can move units next to a wall.

DEAD, you can move an Ultralisk to a Zergling even if it's touching a wall. You knew that of corse, because you used it in your test map.
I just can't figure out why you felt the need to make it so complex. To switch the Zergling to the Ultralisk you move 4 Hero Ultralisks (which are owned by another player) to the Zergling, center a location on one, move the Zergling away, move the Hero Ultralisks away, move the Ultralisk (which is owned by yet another player) to the new location, and then finnaly give it to Player 1.
You could have simply done it like this:

Conditions
*Player 1 brings exactly 0 'Move this to morph' to 'Morph command'.
*Current Player brings at least 1 Ling to 'Field'.
Actions
*Preserve Trigger.
*Comment:Ling -> Ultra
*Move 1 'Move this to morph' for Player 1 at 'Anywhere' to 'Morph command'.
*Center location labeles 'Unit' on [men] owned by Player 1 at 'Field'.
*Move 1 Ultra for Player 1 at 'Morph units' to 'Unit'.
*Move 1 Ling for Player 1 at 'Unit' to 'Morph units'.
[right][snapback]492110[/snapback][/right]


I thought he was already moving the unit to the wall. Or does the large unit have to be placed ontop another inorder to be displaced. If thats the case I have a better idea there are two problems with Kenoli's the way it is now.

1: You have to create a trigger for each type of unit (yes i know this is easly fixed).
2: Even when your out in the open the second unit will be displaced by yours so morphing will always cause your unit to jump a little bit in one direction.

What I propose is to use a move a borrowed Lurker first to establish where a legal spawning place for a large unit is.
(I'm assumeing that a burrowed unit will have the same displacement from the cliff effect but I may be incorrect, burrowed units may not be displaced by anything hence the reason you can place them under buildings)
However if it works here is the trigger.

Conditions:
-Whatever to morph
Actions:
-Move Lurker owned by neutral player to location X
-Move Smaller unit owned by current player to 'out place'
-Center Location X on lurker owned by neutral player at feild
-Move Bigger unit to 'other out place' to location X
-Preserve Trigger

I guess if that doesn't work and the displacement thing bothers you that much then you could have a two step trigger where the first test if the lurker can be placed and continues if it can and the second (if the lurker couldn't be placed) would use something more similer to Kenoli's where it would be displaced.



There are actually lots of things you could do to fix your problem, I've thought of several other just while typing this. It just depends on your determination to make it appear as if it was never an issue.
Report, edit, etc...Posted by JaFF on 2006-05-25 at 09:45:28
I'll test the lurker idea.

ADDITION:
The burrowed lurkers are the same as any other ground unit.

I will first test is it possible to morph. If it's OK, it will morph normally. If it's near the wall I will use DEAD's idea.
Report, edit, etc...Posted by Kenoli on 2006-05-25 at 12:11:28
I swear nobody listens to me.
Report, edit, etc...Posted by JaFF on 2006-05-25 at 12:23:27
QUOTE(Kenoli @ May 25 2006, 07:11 PM)
I swear nobody listens to me.
[right][snapback]492527[/snapback][/right]


DEAD's idea has a little bug due to my map's specifics. ermm.gif

Your idea could work, I didn't say that I denie it, I just didn't try it out yet.

But I will in about 30 minutes. smile.gif
Report, edit, etc...Posted by AshaMeD on 2006-05-25 at 12:43:23
Dude im telling you its the move always that means its always trying to move on the unit... make it Current player commands Marine move location blah on the unit.. Current player Commands zergling move location blah on unit... Trust me that is the problem!!
Report, edit, etc...Posted by JaFF on 2006-05-25 at 13:09:40
QUOTE(AshaMeD @ May 25 2006, 07:43 PM)
Dude im telling you its the move always that means its always trying to move on the unit... make it  Current player commands Marine move location blah on the unit.. Current player Commands zergling move location blah on unit... Trust me that is the problem!!
[right][snapback]492543[/snapback][/right]


This is NOT the problem. If it would be the problem, it would allways end up in the middle, but it doesent. Trust me. If you don't, make your own test map & see.

ADDITION:
I all works, with the exeption of 1 condition:

How to determine, will the marine "fit in the former ling place" ?

I tryed to do this:
Moove zergling to other location
Moove firebat to location where zergling was
And after that, a condition:
neutral player (that commands firebat) brings atleast 1 men to middle of map

Any ideas why it doesen't move it to the middle if it cannot fit ? OR something else is wrong...
Report, edit, etc...Posted by AshaMeD on 2006-05-25 at 13:20:02
Dude im telling you.. it would simply not doing anything if it was because it was 2close when i get home i will make a short thing and switch from marine to zergling... I can bet you 50$$ minerals that thats the problem!! >_< How bout it?
Report, edit, etc...Posted by JaFF on 2006-05-25 at 13:25:08
QUOTE(AshaMeD @ May 25 2006, 08:19 PM)
Dude im telling you.. it would simply not doing anything if it was because it was 2close when i get home i will make a short thing and switch from marine to zergling... I can bet you 50$$ minerals that thats the problem!! >_< How bout it?
[right][snapback]492561[/snapback][/right]


I am turning off the "moove location on unit" trigger while it is morphing & turn it on after it finishes.

So please, don't tell me that again. That is NOT the problem.
Next Page (1)