Ouchface
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > ACS tutorial help
 
Author
All times are GMT. The time now is 16:13. Post New Thread    Post A Reply
Rambosee
Rambodo


Posts: 287
Registered: 01-11


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.
code:
#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?

Old Post 12-25-11 00:49 #
Rambosee is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
HXCpr0n
Mini-Member


Posts: 56
Registered: 08-10


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.

Old Post 12-25-11 02:58 #
HXCpr0n is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Rambosee
Rambodo


Posts: 287
Registered: 01-11



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.

Old Post 12-25-11 03:48 #
Rambosee is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
HXCpr0n
Mini-Member


Posts: 56
Registered: 08-10



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.

Old Post 12-25-11 06:03 #
HXCpr0n is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
EarthQuake
9.5 on the Richter!


Posts: 2745
Registered: 05-03



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.

Old Post 12-25-11 07:03 #
EarthQuake is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 16:13. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > ACS tutorial help

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory