Sie sind nicht angemeldet.

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

1

Mittwoch, 22. September 2004, 09:16

MOVE_UNIT Function

Hi,

I'm actually trying to use this function in a new scenario, but of course, it doesn't work :hey:
The Unit in called "PRINCESSE", her visible status is set to false at the beginning of the game. During the game, she must appear at the battle field, so i want to move her using the MOVE_UNIT function. I proceed like that:

[AREA DEFINE]
"MONDORF" 24, 760, 888, 152
"ZONE" 815, 130, 131, 816

[SCRIPT KERNEL]
IF OBG == FALSE && OBJECT "CHATEAU" KILLED THEN
{
OBG = TRUE;
MOVE_UNIT( "PRINCESSE", "ZONE" );
SET_UNIT_VISIBLE("PRINCESSE", TRUE);
SHOWTEXT("Forteresse_obj02.htm");
}
IF OBG ==TRUE && AREA "MONDORF" TOUCHED_BY_OBJECT "PRINCESSE" THEN
{
WON("HUMAN01");
}
So if the object "CHATEAU" is killed, the princess should appear to the area "ZONE"... But she doesn't.
Note: in the initblock{} i set the princess to the area "MONDORF" like that:
MOVE_UNIT( "PRINCESSE", "MONDORF" );

Can you see what's wrong with this scenario please?

Bomi

Meister der Kleintools

Beiträge: 3 175

Registrierungsdatum: 2. Mai 2003

  • Nachricht senden

2

Mittwoch, 22. September 2004, 09:38

RE: MOVE_UNIT Function

Zitat

Original von manfried
I'm actually trying to use this function in a new scenario, but of course, it doesn't work

At least not in the way we've expected ;)

You can't "beam" objects with MOVE_UNIT, it's only possible to "move" objects! So if you want to change the location, it's just like selecting the object and right-clicking on the target point. If the object isn't able to reach the target the normal way, it's also impossible to do it with MOVE_UNIT...
  ATH, Bomi

Contests: 2008 BEC BOC 1602 | 2007 BEC BOC | 2006 BEC BOC | 2005 BEC BOC | 2004 BEC

ANNOTunesANNOToolsMetropolaris, Georgolaris1602-Zeugs1503-SzenarienDieter's 1503-Editor

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

3

Mittwoch, 22. September 2004, 09:43

RE: MOVE_UNIT Function

Zitat

Original von manfried
Hi,

I'm actually trying to use this function in a new scenario, but of course, it doesn't work :hey:
The Unit in called "PRINCESSE", her visible status is set to false at the beginning of the game. During the game, she must appear at the battle field, so i want to move her using the MOVE_UNIT function. I proceed like that:

[AREA DEFINE]
"MONDORF" 24, 760, 888, 152
"ZONE" 815, 130, 131, 816

[SCRIPT KERNEL]
IF OBG == FALSE && OBJECT "CHATEAU" KILLED THEN
{
OBG = TRUE;
MOVE_UNIT( "PRINCESSE", "ZONE" );
SET_UNIT_VISIBLE("PRINCESSE", TRUE);
SHOWTEXT("Forteresse_obj02.htm");
}
IF OBG ==TRUE && AREA "MONDORF" TOUCHED_BY_OBJECT "PRINCESSE" THEN
{
WON("HUMAN01");
}
So if the object "CHATEAU" is killed, the princess should appear to the area "ZONE"... But she doesn't.
Note: in the initblock{} i set the princess to the area "MONDORF" like that:
MOVE_UNIT( "PRINCESSE", "MONDORF" );

Can you see what's wrong with this scenario please?
I don't think it is is logical to try to move an object into an area.. I'd guess you can only move an object to a place, so the syntax probably is more like MOVE_UNIT( "PRINCESSE", "y,x" ) where y,x are the coordinates to move the figure to. Since that command was never used in any MD-scenario, you are on your own figuring out its syntax..I think Annokrat or Bomi has made some tessts with moving ships around..

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »drkohler« (22. September 2004, 09:45)


manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

4

Mittwoch, 22. September 2004, 09:54

Zitat

MOVE_UNIT( "Object", "Area" )
The object identified by Object is moved on the map into the area defined by Area.
Usually this could be used to relocate ships.


I saw that in the script.txt file in the list of known Script commands so i thought it was use in some scenarios. I also thought that it was strange to use an area for that (where would have be the exact location of the unit then?). I'll with only x,y, thanks

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

5

Mittwoch, 22. September 2004, 10:08

Zitat

Original von manfried

Zitat

MOVE_UNIT( "Object", "Area" )
The object identified by Object is moved on the map into the area defined by Area.
Usually this could be used to relocate ships.


I saw that in the script.txt file in the list of known Script commands so i thought it was use in some scenarios. I also thought that it was strange to use an area for that (where would have be the exact location of the unit then?). I'll with only x,y, thanks
Yes, you are right, I'll have to check why this command moved into the "used" section of the scriipt.txt instead of the "unknown" section... I have never tried to use it..
Maybe as a cop-out you can define two/n identical figures at the two/n desired places and assign them to the dummyplayer. When you "move" the figure, you simply make the previous figure invisible and the next figure visible, giving the impression to the player that your figure actually moved..

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »drkohler« (22. September 2004, 10:11)


manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

6

Mittwoch, 22. September 2004, 12:53

I can't do that, the figure appear in a battle field and it always die during the battle, so i must put it somewhere else and then move it here... And make the figure invisible doesn't avoid it to get dammages :nono:

annokrat

Schatzjäger

Beiträge: 4 772

Registrierungsdatum: 15. November 2003

  • Nachricht senden

7

Mittwoch, 22. September 2004, 17:37

try this:
assign "princesse" in battle field to DUMMYPLAYER.
before making visible assign "princesse" to the needed player, then make princesse visible.
i hope that an object of DUMMYPLAYER will not be dammaged during the battle.

annokrat
  anno 1503, das beste anno aller zeiten.
anno 1701, das anno für ewige anfänger.