Adding custom properties to all characters

Started by timid_dolphin, Mon 22/11/2021 10:15:29

Previous topic - Next topic

timid_dolphin

following imagazzell's thread about custom character animation, I've been trying to streamline my own system.

It would be great if I could call cBob.angry(); to switch bob's speechView to the angry view.

I've finally got my head around extender functions, but what i need is a custom property which stores the angry view so the function can call this.ChangeView(this.angryView);

kind of like this:
Code: ags

function angry(this Character*)
{
	this.ChangeView(this.angryView);
}


Is it possible to add properties to all characters so this would work?

Edit: I actually figured this out moments after posting this. Doh!

so in the edit character dialogue, you can edit the schema, which adds a custom property for all characters. Pretty easy!

SMF spam blocked by CleanTalk