No Splash Powerup Help! Causes crash for some reason
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
No Splash Powerup Help! Causes crash for some reason
I'm trying to make a powerup that stops the layer from taking slash damage and renders him immune to most damaging floors. I got the floor-protection working, but I cant seem to find the ACS equivilent to A_ChangeFlag. I was hoping to do something like this "A_ChangeFlag("NORADIUSDMG",1)" Does that work? Also, if I change the players flag, do the flags reset everytime he goes to a new stage or is it kept?
Last edited by Amuscaria on Thu Sep 14, 2006 9:08 pm, edited 1 time in total.
- Theshooter7
- Posts: 456
- Joined: Sun Mar 05, 2006 6:44 pm
Well, you'd probably need a second simple item that removes the flag in the same manner, and give that at map start. It wouldn't be much more trouble than turning it on, though.
Also, if you don't feel like checking and removing at the beginning of each map, a cheap way would be to just use a global script library with something that looks like this:
Syntax hasn't been checked, and the script number is bogus, but it felt necessary. 
Also, if you don't feel like checking and removing at the beginning of each map, a cheap way would be to just use a global script library with something that looks like this:
Code: Select all
script 92939393 enter
{
giveinventory("RadiusDamageEnabler",1);
}
Erm, something tells me that won't work. Wouldn't the A_ChangeFlag function change the flag of the item itself and not the player?Theshooter7 wrote:Why not use GiveInventory() and give the player an item that will use A_ChangeFlag() and change him to be immune to radius damage?
Also, seeing as how the item will be destroyed when the player picks it up, where would you put the command?
Ok, something is wrong with my library. I made a *.o file just like i did for the regeneration, but for some reason it wont recognize my script when I run the game.
Here's my library:
#include "zcommon.acs"
bool Hellsphere[8];
Here's the decorate:
Here's my library:
#include "zcommon.acs"
bool Hellsphere[8];
Spoiler:Whenever I pick it up, I get this 'ACS: I dont know what (a Flat name) is" or it jsut crashes out. Here's the crash report.
Here's the decorate:
Spoiler:it;s supposed to give the NORADIUSDMG flag and a powerup that lasts for (2 hours, since i dont know how to set a powerup to last forever) that takes away floor and environment damage.
- Theshooter7
- Posts: 456
- Joined: Sun Mar 05, 2006 6:44 pm
The regeneration thing worked just fine with the delays. o_o I basically copy and pasted the thing and just added the giveinventory commands.Theshooter7 wrote:I can't remember, but aren't you not allowed to have delays inside of while statements? I might be wrong on that though. Maybe I am mistaking it for functions...
Doh! Been gone... too long! Must.... research.... more!Grubber wrote:No, it will change the activator's (player's) flag.HotWax wrote:Erm, something tells me that won't work. Wouldn't the A_ChangeFlag function change the flag of the item itself and not the player?
Yes you are. ACS doesn't support delays in functions because a function should occur entirely within 1 tic, unlike scripts which can span multiple tics using delays.Theshooter7 wrote:I can't remember, but aren't you not allowed to have delays inside of while statements? I might be wrong on that though. Maybe I am mistaking it for functions...
This does have the side-effect of making most while loops pointless in functions since whatever the while is waiting on is unlikely to change. Maybe that's where your confusion comes from.
