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

ACS tutorial help

Recommended Posts

Wanting to try out ACS and see how it works, I looked at and started the beginners guide. I got to the Thing_Damage part. Following it's instructions, I wrote the code just like it said.

#include "zcommon.acs"

script 1 (void) 
{
    Thing_Damage(1,2,0);
}
I made the red key execute the script with action 80, putting 1 for script number and nothing else. Then as it told me, I put a player start and tagged it as one. Tagged the key as two, although uncertain as to why. Then I tested it. Nothing happened. Then I untagged myself and tagged a monster instead. It worked. How do I get the player to be damaged when he walks over the key? Not killed, just damaged?

Share this post


Link to post

You did everything right, but if you want to damage the player, set the thing tag in Thing_damage to 0 or use the Damagething function, they are essentially the same thing as far as I know. This way, it damages the activator of the script (the player).

I'm not quite sure though why it doesn't work if you tag the player as 1 and set thing_damage to damage those tagged with 1.

Share this post


Link to post
HXCpr0n said:

You did everything right, but if you want to damage the player, set the thing tag in Thing_damage to 0 or use the Damagething function, they are essentially the same thing as far as I know. This way, it damages the activator of the script (the player).

I'm not quite sure though why it doesn't work if you tag the player as 1 and set thing_damage to damage those tagged with 1.

I tried setting the tag to zero, and who knew, it worked! And true to your word, it didn't harm any monsters with a tag of zero.
I tried changing Thing_damage to Damagething, but when I launched it, it said 'Incorrect number of special arguments'. All I did was change the Thing_damage text.
And maybe the tag 1 or above won't work because maybe the tutorial was build for an older version, and in a newer one the commands were changed up a bit.

Share this post


Link to post
Rambosee said:

I tried setting the tag to zero, and who knew, it worked! And true to your word, it didn't harm any monsters with a tag of zero.
I tried changing Thing_damage to Damagething, but when I launched it, it said 'Incorrect number of special arguments'. All I did was change the Thing_damage text.
And maybe the tag 1 or above won't work because maybe the tutorial was build for an older version, and in a newer one the commands were changed up a bit.


Actually, it didn't work for me either when I tried it lol. I assumed it would since it makes sense - you tag the player start as one and set the TID in the script to run, but apparently not.

I'm not sure why damagething would give you that error unless you typed in more than one argument, because all you need to do is put in the damage amount as the 1 argument (the activator gets the damage). Doesn't matter, Thing_damage is ultimately more useful to use.

Share this post


Link to post
Rambosee said:

I tried setting the tag to zero, and who knew, it worked! And true to your word, it didn't harm any monsters with a tag of zero.
I tried changing Thing_damage to Damagething, but when I launched it, it said 'Incorrect number of special arguments'. All I did was change the Thing_damage text.
And maybe the tag 1 or above won't work because maybe the tutorial was build for an older version, and in a newer one the commands were changed up a bit.


DamageThing affects the activator only and accepts 2 arguments (the damage and the means of death). Thing_Damage on the other hand accepts an additional argument, the TID of the thing to receive the damage (where 0 can be used to make it work similar to DamageThing). Be sure to take a look at the ZDoom wiki for each ACS function or special you use to make sure you understand exactly what each does. Some specials may sound similar but do different things. The wiki should clarify the differences, like in this particular case.

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
×