That seems like it would take a lot of time but still it is really amazing.
Re: "How do I ZScript?"
Posted: Sat Feb 25, 2017 1:32 pm
by Ryan Cordell
ZZYZX wrote:Mmm, 1138 line tada... I wouldn't use that to persuade people into using ZScript really.
Nobody said it was an example on ZScript's ease-of-use.
Re: "How do I ZScript?"
Posted: Sat Feb 25, 2017 3:01 pm
by Graf Zahl
That thing is a really bad example because it had to replicate some shitty coding by Raven that was compounded by a horrendous conversion into classes by Randi. The ZScript version is just a 1:1 translation of the old C++ code with no attempt to make it easier to use (as that would most likely have broken the whole thing.)
Re: "How do I ZScript?"
Posted: Sat Feb 25, 2017 4:03 pm
by Ed the Bat
How can I check, for example, if FastMonsters is currently in play? I see there's a SKILLP_FastMonsters constant, but I don't know how or where to apply this.
Re: "How do I ZScript?"
Posted: Sat Feb 25, 2017 9:45 pm
by Nash
Vaecrius wrote:
+usespecial does nothing whether I enable it or not.
Did you manage to get this to work? If not, can you make a bug report, please? I don't have time to take a look at this currently and I feel this should be reported if it isn't working
class UseZombieMan : ZombieMan replaces ZombieMan
{
override bool Used(Actor user)
{
// supposed to kill the zombieman and give you health bonus
user.A_GiveInventory("HealthBonus", 1);
A_Die();
return true;
}
}
Hmm actually it doesn't work, this simple test actor doesn't work, will make a bug report
ALSO Vaecrius, I don't know if you practice this but I saw semicolons on your flags in the Default block. You don't need those. If you've been doing those, I'd remove them, they might break in future. Nothing in GZDoom uses semicolons for flags.
Re: "How do I ZScript?"
Posted: Sun Feb 26, 2017 5:39 am
by Nash
Bug has been fixed in c150f9d have fun stealth-killing the first 2 zombiemen in Doom 2 map01!
Re: "How do I ZScript?"
Posted: Sun Feb 26, 2017 7:30 am
by Blue Shadow
Ed the Bat wrote:How can I check, for example, if FastMonsters is currently in play? I see there's a SKILLP_FastMonsters constant, but I don't know how or where to apply this.
Unless I'm wrong, The SKILLP_* constants are used with the G_SkillProperty* functions, which return info about the skill property you pass.
Did you manage to get this to work? If not, can you make a bug report, please? I don't have time to take a look at this currently and I feel this should be reported if it isn't working
I gave up on it shortly after because what I wanted to use it for had some unfortunate side effects (e.g., the thing in question could be in front of a switch or door, preventing the player from using said switch/door).
Major Cooke:
+usespecial does nothing whether I enable it or not.
ZZYX suggested it and the wiki does occasionally contain wrong information.
Re: "How do I ZScript?"
Posted: Mon Feb 27, 2017 8:16 am
by Major Cooke
Well Nash found out it was completely broken from the getgo. Also, I wrote that wiki part. It actually does work. The function simply wasn't triggering like it was supposed to due to a bug in the engine.
Re: "How do I ZScript?"
Posted: Mon Feb 27, 2017 10:55 am
by Xaser
So, it worked except for the fact that it didn't?
Re: "How do I ZScript?"
Posted: Mon Feb 27, 2017 12:04 pm
by Major Cooke
Meh, time contexts. Back then it didn't, it does now. I'm just pointing out that +USESPECIAL must not be on an actor if the Used function is to be utilized. I was also making sure everyone saw what the wiki on it, and I know it's correct because Graf's commit message said so.
By giving A_RailAttack the RGF_EXPLICITANGLE flag, and setting the spread_z parameter to BulletSlope()-pitch, I now have a railgun that respects autoaim.