NPC frames

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

NPC frames

Post by agentorangeguy »

Hello, I was messing around with the wounded man shape in BG (Shape # 447 I think?) and making an NPC with that shape. The NPC just lays there in the first frame, not cycling through all the wounded frames as the shape itself does if you just lay it there. I tried playing around with the flags for the NPC, giving it different schedule types, but nothing happens except for the npc moving around like it was floating or something.

Can the wounded man shape be viable for NPC's and function properly if you do some kind of code in the NPC's usecode where it will cycle through all the frames randomly? How would I go about doing that? Thanks!
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: NPC frames

Post by Donfrow »

You should be able to make a proximity call to cycle through the frames of the shape.

In one of my NPC's I have the below usecode that works (though it was a bit slow to cycle through each frame):

else if (event == PROXIMITY)
{
script item
{
frame 0;
repeat 32
{
next frame cycle;
};
}
}

Where PROXIMITY is 0.

I believe I butchered the original code for the loom from found at seventowers to make that.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: NPC frames

Post by agentorangeguy »

Hmm, I'll have to try this.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Locked