Search found 1702 matches

by Player701
Fri Apr 25, 2025 2:51 am
Forum: Scripting
Topic: Can monster melee attacks poison the player?
Replies: 6
Views: 351

Re: Can monster melee attacks poison the player?

Heisanevilgenius wrote: Thu Apr 24, 2025 1:46 pm So, a weird side effect is that these monsters now infight when they hit each other with their projectiles...
I'm unable to reproduce this with my example code. It must be caused by something else in your code.
by Player701
Wed Mar 26, 2025 5:49 am
Forum: Scripting
Topic: Hexen - Custom Player Class weapons switch to Hammer of Retibution when mana runs out.
Replies: 1
Views: 850

Re: Hexen - Custom Player Class weapons switch to Hammer of Retibution when mana runs out.

The way Hexen weapons are set up is that each class-specific weapon is forbidden to the other two classes (e.g. cleric's weapons are forbidden to fighters and mages). Being a custom player class, yours is exempt from any of these restrictions, and thus can receive and use all of the classes' weapons ...
by Player701
Wed Mar 26, 2025 2:42 am
Forum: Scripting
Topic: Quick question on global variables.
Replies: 2
Views: 188

Re: Quick question on global variables.

Well, obviously, if you do not declare a global variable in a certain map script, that variable isn't going to magically disappear. Since what you are doing is essentially just creating a human-readable alias for a specific index into the ACS global variables array. However, it might be beneficial ...
by Player701
Wed Mar 26, 2025 2:33 am
Forum: Scripting
Topic: Best Way to Make a Patch that Changes Actor Angles in Vanilla Hexen maps?
Replies: 1
Views: 919

Re: Best Way to Make a Patch that Changes Actor Angles in Vanilla Hexen maps?

LevelPostProcessor is indeed the way to go if your intention is to patch maps without shipping replacement versions (which may be illegal due to the IWAD's commercial nature). I don't think there is a simpler way, but it couldn't be any easier. You just need to get the map hashes via the ...
by Player701
Wed Mar 26, 2025 2:04 am
Forum: Scripting
Topic: I'm trying to find or make a deltaTime variable in zscript for HUD mod
Replies: 1
Views: 1321

Re: I'm trying to find or make a deltaTime variable in zscript for HUD mod

I've just checked my own code that I use for some primitive HUD animations, and it relies on the MSTimeF function, which returns the amount of time passed since the start of the game in milliseconds. This is also better than tics because your animation parameters do not depend on the tic rate, and ...
by Player701
Wed Mar 26, 2025 1:44 am
Forum: Scripting
Topic: [ACS] Division by Zero Issue
Replies: 1
Views: 1006

Re: [ACS] Division by Zero Issue

I do not see any division operations in your code where the divisor may be zero. Besides, the game should not crash if such a division happens in script code, but instead print a warning message and terminate the script. Are you sure that the issue is caused by these particular scripts and not by ...
by Player701
Sun Feb 16, 2025 12:08 am
Forum: Scripting
Topic: DECORATE to ZScript Conversion questions
Replies: 17
Views: 1358

Re: DECORATE to ZScript Conversion questions

It also comes from Hexen itself, so it had to use byte angles, particularly to be used directly on lines in Hexen format maps. Haven't played Hexen in ages, but now I actually remember that special being used there in some levels (Hypostyle comes to mind as the most prominent one). Yeah, then it ...
by Player701
Sat Feb 15, 2025 11:52 am
Forum: Scripting
Topic: DECORATE to ZScript Conversion questions
Replies: 17
Views: 1358

Re: DECORATE to ZScript Conversion questions

The problem is with this line of code: INCY E 0 ThrustThing (angle*256/360, 12, 0, 0); Ii is used to make an enemy jump towards the player. However, GZDoom warns me that there is a truncation of floating point with it. This is because the first argument of ThrustThing is of type int (don't ask me ...
by Player701
Sat Feb 15, 2025 11:30 am
Forum: Scripting
Topic: I don't understand why unedited parts of a functional script are causing errors
Replies: 1
Views: 508

Re: I don't understand why unedited parts of a functional script are causing errors

Your edited script runs fine for me in GZDoom 4.14. Could you please upload the entire WAD/PK3 file for further investigation?
by Player701
Sat Feb 15, 2025 11:14 am
Forum: Scripting
Topic: Can I make a key give itself to all players in co-op?
Replies: 2
Views: 574

Re: Can I make a key give itself to all players in co-op?

There is also a CVAR you can use: sv_coopsharekeys. If you don't want to use it, you can also override ShouldShareItem for your custom key class to always return true.
by Player701
Thu Jan 30, 2025 1:36 am
Forum: Scripting
Topic: Help With A_SprayDecal Offset/Direction
Replies: 2
Views: 2283

Re: Help With A_SprayDecal Offset/Direction

The most obvious issue with your code seems to be that you're essentially adding Pos.Z to offset , which is an error because offset is already intended to be relative to the calling actor's position, which naturally includes the Z coordinate. If you fix that and it's still not working right, could ...
by Player701
Thu Jan 30, 2025 1:24 am
Forum: Scripting
Topic: Can monster melee attacks poison the player?
Replies: 6
Views: 351

Re: Can monster melee attacks poison the player?

If you can use ZScript, it is not that difficult a task to code a function that does exactly what you want: void A_CustomPoisonComboAttack(class<Actor> projType, int meleeDamage, sound meleeSound) { if (Target != null && CheckMeleeRange()) { A_StartSound(meleeSound, CHAN_WEAPON); int newdam = Target ...
by Player701
Thu Jan 30, 2025 12:55 am
Forum: Scripting
Topic: level name, warp and such (stand alone)
Replies: 4
Views: 627

Re: level name, warp and such (stand alone)

So what you are telling me is that the game/engine, using the -warp command, only works with mapXX or EXMX whatever my mapinfo and such say, just to clarify? Whatever the mapinfo or other setting say about level names etc? Yes, exactly. (Sorry about the delay - forgot to subscribe to this thread ...
by Player701
Thu Jan 16, 2025 6:16 am
Forum: Scripting
Topic: level name, warp and such (stand alone)
Replies: 4
Views: 627

Re: level name, warp and such (stand alone)

From the source code it appears that you need to add a MAP01 so that "-warp x" works properly. If you have a WAD file, then an empty MAP01 lump will do. If it's a PK3, then you need either maps/map01.wad or maps/map01.map ; again, they can be empty. Note that I haven't actually tested this. Upd: No ...
by Player701
Wed Jan 15, 2025 1:55 am
Forum: Scripting
Topic: ACS Looping Woes
Replies: 2
Views: 898

Re: ACS Looping Woes

First of all, you are mixing two loop concepts here: the while loop and a loop implemented via restart statements. While it is most likely going to work, I still suggest that you use either one or the other to avoid potential bugs in the future. I consider while to be a "cleaner" approach, but in ...

Go to advanced search