Page 1 of 1

Monster that checks any dead monsters near him to loot.

PostPosted: Thu Jul 29, 2021 1:02 pm
by Alice Grimhall
Hello, I recquire some help for monster coding, and I haven't found any way to achieve what i'm looking for.

Basically, I want a monster to check any dead monsters near him to start looting them.
I know I should use A_CheckProximity, but I can't specify ANY monster in the actor section.

Is there an alternative way to do it ? If ACS is necessary , i'm afraid I can't use it because I know nothing about it...

Re: Monster that checks any dead monsters near him to loot.

PostPosted: Thu Jul 29, 2021 1:23 pm
by Jarewill
I don't know if it's possible purely in DECORATE, but you can do that using ZScript as shown here.
ZScript mostly looks like DECORATE and you don't even need to rewrite your monster fully, simply create a new monster in ZScript with the above function and inherit from it in DECORATE.

Example of the above taken straight from my mod:
Spoiler:

Re: Monster that checks any dead monsters near him to loot.

PostPosted: Thu Jul 29, 2021 1:33 pm
by Alice Grimhall
Thank you for your reply, I still need to figure out how to use ZScript, as I probably never used it ever, but this could probably be what i'm looking for.
Is there any good guides about ZScript to make monsters ? I'd be extremely grateful !

Re: Monster that checks any dead monsters near him to loot.

PostPosted: Thu Jul 29, 2021 1:52 pm
by Jarewill
For the most part, ZScript is like DECORATE and you can see the differences on this page.
The only things that are really different are the ability to make functions.
For example, instead of writing this:
Spoiler:

You can make this:
Spoiler:

As well as being able to define variables for actors. (Even for weapons)

Re: Monster that checks any dead monsters near him to loot.

PostPosted: Thu Jul 29, 2021 2:12 pm
by Alice Grimhall
Oh wow it really makes the script looks way cleaner ! I had no idea this was so much better, thank you very much !
I'll try to use this to make what I had in mind, thanks :)