Double moves by creatures on step macro map edit

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Double moves by creatures on step macro map edit

Post by rld »

Don't know if this really qualifies as a bug, since it could be the basis for some interesting effects, but I thought it was worth pointing out.

If you make any map edits in your step macro, creatures get another move after the step macro completes. The map edit doesn't even have to actually change anything; my test case was the step macro

MAPTAKE 1 1 (object not typically found on the map)
STOP

With this running, if you have a hostile creature adjacent to the player, it will attack twice per turn; once before the step macro runs, and once after.

However, this can be worked around by also including in the step macro:

SET INVISDUR=1
SET INVISICO = (the normal player icon)

This will keep creatures from attacking the player twice, although they may still move twice.

Admiral Ackguh
Posts: 137
Joined: Sat Nov 03, 2012 11:26 am
Location: Canada
Contact:

Re: Double moves by creatures on step macro map edit

Post by Admiral Ackguh »

rld wrote:If you make any map edits in your step macro, creatures get another move after the step macro completes. The map edit doesn't even have to actually change anything; my test case was the step macro
I has having some problems with my game until I searched, and saw this old message.
MAPTAKE 1 1 (object not typically found on the map)
STOP
Also, never make unnecessary map/terrain changes. That's what caused all my trouble. It's a good programming practice to always use MAPCHK and MAPCHKD to make sure the change is really needed, such as:

MAPCHK 1 1 Z
IF Z=10 THEN
MAPTAKE 1 1 10

Avoiding unnecessary map changes not also avoids the creature double-move, and may also speed up the step macro.
- A:A:

Post Reply