Set Icon Walking Macro / ultima6 anyone?

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

Moderators: Ice Cream Jonsey, joltcountry

joebonk
Posts: 112
Joined: Mon Aug 27, 2012 3:16 am
Location: las cruces, nm

Set Icon Walking Macro / ultima6 anyone?

Post by joebonk »

I made a macro that simulates the walking in ultima6
It uses 12 tiles, three tiles per direction, n s e w.
using lastmov and qa 40 #
Here is a video:
Video Link
Drawback: Monsters can not change tiles with there direction moves.
Question: ACK must know that a monster is going to move in a direction. Could we use a hAck to, instead of animating in one spot, to somehow have ack make them use a tile to change a direction?

If so then I would definitely use this way of walking.
In the video, I had to have the ground objects run the macro. The step macro would not run the qa 40 #.
Which is better because it should only run if the process of walking is taking place rather then for any action being performed. EDIT: icon = # will run, better.

more about changing player icon:http://www.joltcountry.com/phpBB2/viewtopic.php?t=5746
Last edited by joebonk on Wed Sep 11, 2013 4:03 am, edited 1 time in total.

joebonk
Posts: 112
Joined: Mon Aug 27, 2012 3:16 am
Location: las cruces, nm

icon walking

Post by joebonk »

Update:
Bingo! Now I know how to change the direction of creatures. Using patch commands.
DRAW 999 304 TO <I> <val> OF 0 0

This command changes the current type of the creature with instance number
<i>, obtained using "DRAW 999 300". This creature can be anywhere in the
region. The HP is set to <val>.

So therefore, I have to make 4 creatures into one creature. one creature using a tile for one of four directions. Facing up down left or right. And Change the creature to one that faces a different direction when it approaches that part of the screen.
To find out where the creature is:

DRAW 999 303 TO <i> <var> OF 0 0

This command retrieves the source type of the creature with instance number
<i>, obtained using "DRAW 999 300". This creature can be anywhere in the
region. The source type is written into variable <var>.

The source type is the 'identity class' of the creature; each creature type
has a number, as shown in the ACK creature editor.

Problem here is that I only need to check within the 16 x 16 or 11 x 16 area of the map. And this command would check the entire region. And who cares whets happening off screen in combat? All world maps of my present game are 240 x 240 size. On the other hand:

DRAW 999 300 TO <x> <y> OF <var> 0

This command obtains the creature instance number (if one exists) from
map location <x>, <y>. This is basically the index into the master table
that stores information about a particular creature (not a creature type)
in a region. The instance number is stored in variable <var>.

In order to use this command, the creature must be in the current room
(for room type regions) or within 16 or so spaces of the player (for worldmap
type regions), the same as the mapediting commands (MAPSET, MAPCHK, etc.)

But what does 'about a particular creature (not a creature type)' mean? the creature # in the people editor? Hopefully. But could it mean what number of creature that was placed on the map. If there are only three trolls on a map then they will be remembered as creature 1 2 or 3 in that region..? I so hope its the former and not the later.

Post Reply