Search found 10 matches
- Sun Jul 16, 2023 5:15 am
- Forum: Scripting
- Topic: Help with Event Handler accessing PlayerInfo/Player Pawn code
- Replies: 3
- Views: 431
Re: Help with Event Handler accessing PlayerInfo/Player Pawn code
That worked for the SoundClass, thank you! I'm not sure how you would even reference WeaponSlots 1-9 in the Event Handler. I am trying to make it possible to switch characters without actually changing player class; instead just modifying the current player's variables to make it seem like you ...
- Fri Jul 14, 2023 1:31 pm
- Forum: Scripting
- Topic: Help with Event Handler accessing PlayerInfo/Player Pawn code
- Replies: 3
- Views: 431
Help with Event Handler accessing PlayerInfo/Player Pawn code
Is it possible to access and modify PlayerInfo structs or PlayerPawn code in the Event Handler? For example the current player's SoundClass or Player.WeaponSlot? class PlayerSwitch : EventHandler { override void NetworkProcess (ConsoleEvent e) { let plmo = players [e.Player].mo; let pawn ...
- Sat Dec 17, 2022 5:04 pm
- Forum: Scripting
- Topic: Returning an integer for currently selected crosshair
- Replies: 2
- Views: 223
Re: Returning an integer for currently selected crosshair
Jeez... It was that simple!! I didn't even notice I wasn't adding action to the function inside of a weapon...
Simple fix, thank you!

Simple fix, thank you!
- Sat Dec 17, 2022 2:49 pm
- Forum: Scripting
- Topic: Returning an integer for currently selected crosshair
- Replies: 2
- Views: 223
Returning an integer for currently selected crosshair
I am trying to make a simple function to return the player's currently selected crosshair as an Integer. This is inside code of a base class for a weapon, just so you know the context. Here is the function: int GetCurXhair() { return -int(player.ReadyWeapon.Crosshair); } Then when I try to use it in ...
- Sun Dec 11, 2022 11:05 am
- Forum: Scripting
- Topic: Help with referencing weapon in Event Handler
- Replies: 6
- Views: 570
Re: Help with referencing weapon in Event Handler
Yeah, that's even better than what I was thinking initially! I realize how obvious the toggle was... I don't know why I didn't think of that!
Thank you so much for all your help on this, I appreciate it!

Thank you so much for all your help on this, I appreciate it!
- Fri Dec 09, 2022 5:10 pm
- Forum: Scripting
- Topic: Help with referencing weapon in Event Handler
- Replies: 6
- Views: 570
Re: Help with referencing weapon in Event Handler
CustomInventory should be ok. I just read on the Wiki: "This class is unnecessary in ZScript outside of very specific use cases, like overlays." Neat, I didn't know you could have overlays outside of weapons. The only issue now is I had weapons in mind because I wanted to be able to select and ...
- Sun Dec 04, 2022 3:59 pm
- Forum: Scripting
- Topic: Help with referencing weapon in Event Handler
- Replies: 6
- Views: 570
Re: Help with referencing weapon in Event Handler
Ahh yes! That was it, thank you. I'll also keep those differences in mind in the future.
Is it possible to keep the Visor state from deselecting after weapon switch??
Is it possible to keep the Visor state from deselecting after weapon switch??
- Sun Dec 04, 2022 2:11 pm
- Forum: Scripting
- Topic: Help with referencing weapon in Event Handler
- Replies: 6
- Views: 570
Help with referencing weapon in Event Handler
I've been trying to reference the player's weapon through event handler with no success. What I'm trying to do is a weapon overlay via event handler for a key bind. I think I'm doing everything else right besides the reference to the weapon because it still prints out my test message but A_Overlay ...
- Wed Nov 02, 2022 5:09 am
- Forum: Scripting
- Topic: Projectile orbiting player issues
- Replies: 2
- Views: 314
Re: Projectile orbiting player issues
It works as intended now, thanks a ton! I was stuck on this for a while!
It makes sense to me and I see what I did wrong now.
Also yeah, I can see that I misunderstood what Abs did and is not what I would want at all.
It makes sense to me and I see what I did wrong now.
Also yeah, I can see that I misunderstood what Abs did and is not what I would want at all.

- Sun Oct 30, 2022 2:22 pm
- Forum: Scripting
- Topic: Projectile orbiting player issues
- Replies: 2
- Views: 314
Projectile orbiting player issues
Hey, first time poster here. I've been having issues with projectiles orbiting around the player. I can get them to orbit as intended on a plane that is 0 but as soon as the player's Z height changes, the orbit effect breaks. I tried referencing the calling-actor's (player's) Z coordinates, but it ...