Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Getting my enemy to attack isn't working

Recommended Posts

Cheeky title change!! This is no longer about Imp code firing fireballs but my other problem still exists.


Ahh so many edits.

Well anyway, my big enemy works, my little enemy works....but I can't figure out how to make the bigger one spit out the little one. I tried to imitate the code that comes with the Elemental and Lost Soul but no luck so far.

I had a look on the wiki but I can't make sense of it. I'm currently looking for a tutorial on it should there be any....

*Edit again*

Well that's something, I can make my bigger enemy use different types of enemy attacks easily enough....but I can't for the life of me get him to fire out the little enemy I made. I don't know how to link the two and I can't find any clear info on it.

Share this post

Link to post

Oh I forgot to mention.

I am using DECORATE in Slade.

If it'll help, I put both enemies in a WAD for people to look at.

As you can see I've been messing around some. But I can't seem to reach what I want.

I want that little ant, to be spat out by that bigger ant.

Also, please excuse my sprite work, I'm not really that good at it >_>

Share this post

Link to post

A_PainAttack will spawn lost souls by default if you don't specify which actor to spawn. So, doing the following should do it:

FLAM F 1 bright A_PainAttack("LittleAnt")
There are more options you can have with that codepointer, so you might want to check its linked article just above.

Share this post

Link to post

Oh, I've been doing that all wrong. In the past I've tried putting in FLAM F 1 bright A_AntManAttack or some such like, sometimes putting // See LittleAnt in there too . but of course, it not showing up orange and being wrong in general I got no results.

I even also tried specifying the little enemy as a projectile which needless to say went horribly wrong.

But thanks for the help though, I'll check out that article and see if I can learn more about it. I'm not a code master so doing this made me wanna kill somebody!

Share this post

Link to post

// marks the beginning of a comment -- everything behind it up to the end of the line is ignored by the game. So comments like // See lostsoul serve to help explain what the code does -- e.g., since the function spawns a lost soul, you can check the lost soul's article for explanation of what it does.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now