Full Version : XMLDialog: Doing Math in Conditions
xmlspawner >>Q&A >>XMLDialog: Doing Math in Conditions


<< Prev | Next >>

Lichtblitz- 04-29-2008
Hi,

I would like to create an NPC that checks at a certain point if the player is still in range. It would be great checking this dynamically like

GETONTRIGMOB,x < GETONPARENT,x + 3 & GETONTRIGMOB,x > GETONPARENT,x - 3 & GETONTRIGMOB,y < GETONPARENT,y + 3 & GETONTRIGMOB,y > GETONPARENT,y - 3

But it seems that these expressions are evaluated as strings rather than mathematical Operations. Is there a way to tell XMLDialog to do the math or do I have to use hardcoded values and NPCs that can't walk?

Mideon- 07-27-2008
Kind of a bit late I suppose, but I was toying around today....

Try using the INC,amt or INC,min,max keywords instead of + or - signs.....

Lichtblitz- 07-29-2008
Ah, right, that should do the trick. Thanks a lot :-)