Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ArrivedHero

Members
  • Content count

    24
  • Joined

  • Last visited

About ArrivedHero

  • Rank
    Warming Up

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ArrivedHero

    Hitboxes and PlayerClasses

    Ok, two quick questions. How small (or large) can a hitbox be without the engine running into problems with collisions? Like, say you wanted to make a 1 by 1 projectile for a bullet, or several 4 by 4 hitbox for the torso of an enemy. Would that be possible without problems with collision detection? Maybe in ZScript, there is a way to add more vertices to the hitboxes? Second is just a preference advice. If I were to have the player have multiple outward appearances, such as changing the sprite to match what kind of armor they are wearing; should I just stick to that one player class and try to work with the state machine, or have them morph into other classes to avoid any confusions and mishaps during development?
  2. ArrivedHero

    Zscript HUD Font

    Update: Found the problem. I had to add the updated version into the ZScript file "version '4.1.2'". I know, I'm a version behind but I'm working on it.
  3. ArrivedHero

    Zscript HUD Font

    Hey, I've been trying to create my own HUD with my own fonts but of course I am running into trouble. I am following along with how the DoomStatusBar class added it's own fonts in it's Init() function but I keep getting a "expression must be a modifiable value" error. Here is my code. class TheLastIconHUD : BaseStatusBar { HUDFont visor; HUDFont damageEffects; override void Init() { Super.Init(); SetSize(0, 1920, 1080); Font fnt = "TESTFONT"; visor = HUDFont.Create(fnt, fnt.GetCharWidth("0"), Mono_CellLeft, 1, 1); fnt = "DAZEFONT"; damageEffects = HUDFont.Create(fnt); } override void Draw(int state, double TicFrac) { super.Draw(state, TicFrac); DrawImage("hud0", (0, 0), DI_ITEM_OFFSETS); } } What exactly am I doing wrong?
  4. ArrivedHero

    ZScript: Custom Pointers

    The issue has been resolved but it has left my head scratching.
  5. ArrivedHero

    ZScript: Custom Pointers

    Partially resolved. Instead of using "let" I used "actor" in the attack function; however, it is still not printing out the intended target. It only "sees" the player and not what the player is looking at.
  6. ArrivedHero

    ZScript: Custom Pointers

    I'm sorry I keep asking the same questions over and over again but I'm struggling with another thing with ZScript. I am trying to make a custom pointer for the player for the player's children and weapons to access. I made a public Actor class variable of targetSights, that constantly updates to whatever is underneath the players crosshairs in an overridden Tick function. { Actor targetSights; override void PostBeginPlay() { Super.PostBeginPlay(); //other stuff targetSights = null; } override void Tick() { // if/else statement to make sure that this is not a voodoo of the player. GetTarget(); } void GetTarget() { targetSights = GetPointer(AAPTR_PLAYER_GETTARGET); } } For the weapon I am using the fist for experimentation but the code I got for it to use is in a custom action function A_PlayerPunch() the code is this. Actor fistOwner = NewMarine(invoker.owner); if(fistOwner != null) { if(fistOwner.targetSights !=null) { Actor fistTarget = fistOwner.targetSights; A_PrintBold(fistTarget.Species); } } I keep getting an error that it does not know what targetSights is in the ZScript I typed up for the custom melee attack. What am I doing wrong?
  7. ArrivedHero

    ZScript: The Elephant In The Room

    Oh ok, yeah. I'm familiar with that. Thank you.
  8. ArrivedHero

    ZScript: The Elephant In The Room

    Wait, holdup, that makes sense now thinking about it.
  9. ArrivedHero

    ZScript: The Elephant In The Room

    Ok, is this a Java thing or just one of the many quirks of ZScript?
  10. ArrivedHero

    ZScript: The Elephant In The Room

    Ok, so I am trying not to make too many threads and keep them under the same categories. My next question is concerning class variables, I understand the difference between private and public variables but I see that they can only be private for ZScript. I was wondering if there was any way, say a weapon class was able to read a variable of its owner. Or, am I stuck with declaring global variables with Event Handlers?
  11. ArrivedHero

    Crouching: What exactly is going on?

    Ok, figured it out, it is in CheckCrouch(). The if else statement that has the CrouchMove() function is where I want to place my code. Thanks again.
  12. ArrivedHero

    Crouching: What exactly is going on?

    I appreciate the help, but this does seem like something that I am going to have to simulate through a "crouch" state or morph, I will continue looking through this. Thank you.
  13. What exactly is the engine doing when the player chooses to crouch? I poured through ZScript in "shared" for anything and the closest I could find what I am looking for were a couple of internal functions that handling crouch movement but none of them really explained how the sprites change or the player's height. Also, is there a button for toggle crouch? I don't mean the option to toggle but like an actual "BT_TOGGLECROUCH". Because currently I'm working on a ZScript that will switch the player's camera from their own to a child tracer, and I can only get it to work by using the hold down method. Does the engine morph the player and retain all their items and stats or something when they crouch?
  14. ArrivedHero

    ZScript: The Elephant In The Room

    Alright, that's interesting. Thank you.
  15. ArrivedHero

    ZScript: The Elephant In The Room

    To answer previous questions, Empyre asked if "is" is an operator. Yes it is, you are correct in your assumption that it is similar to the "==" operand. Partly the reason I am using ZScript is because I feel like it is a lot neater and two is because I am currently learning a programming language and I want to push myself. In all fairness, there is some documentation for ZScript but it is not so friendly to people using it for the first time and you do need some prior knowledge to understand it. Here is the new code: (Please follow example if you need help ;) class NewKnuckles : Fist { States { Fire: PUNG B 4; PUNG C 4; PUNG D 5 A_PlayerPunch; PUNG C 4; PUNG B 5 A_ReFire; Goto Ready; } action void A_PlayerPunch() { A_PrintBold("Test"); if(invoker.Owner && invoker.Owner is "MaleMarine") { if(countinv("PowerStrength")) { A_CustomPunch(2*random(1, 10), true, 0, "MeleePuff", 0, 0, 0, "none", "player/male/fist", "skeleton/swing"); } else { A_CustomPunch(4*random(1, 10), false, 0, "MeleePuff", 0, 0, 0, "none", "player/male/fist", "skeleton/swing"); } } else { if(!countinv("PowerStrength")) { A_CustomPunch(random(1, 10), true, 0, "MeleePuff", 0, 0, 0, "none", "player/male/fist", "skeleton/swing"); } else { A_CustomPunch(2*random(5, 15), false, 0, "MeleePuff", 0, 0, 0, "none", "player/male/fist", "skeleton/swing"); } } } } Lastly, I did promise a demo for ladders, so I should get on that.
×