User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13

Thread: Reflected Magic LWeapon Hitbox Rotated 90 Degrees

  1. #11
    Keese ywkls's Avatar
    Join Date
    Feb 2016
    Posts
    62
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    476
    Level
    7
    vBActivity - Bars
    Lv. Percent
    86.27%
    Quote Originally Posted by ZoriaRPG View Post
    Compare to EW_MAGIC (Type ID 134) and EW_BEAM (Type ID 132). The reflected weapons (LW) are generated by reflecting EWeapons, so they should have the same hitbox as the EWeapons, as they should inherit the EW properties.
    Whoops. I didn't understand what you meant the first time.

    EW_BEAM and EW_MAGIC both seem to share the rotated hitbox properties. At a guess, I'd say that this is either what makes them hurt Link, or is just that LW_REFBEAM and LW_REFMAGIC are basicially generated in the same fashion.

    Either way, looks like this may not be a bug after all; just an oddity.

  2. #12
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,430
    Level
    24
    vBActivity - Bars
    Lv. Percent
    69.57%
    That sort of raises another point: weapon hitboxes are set up in the constructor, and weapons created by scripts always start out facing upward. Their hitboxes don't vary depending on their direction like built-in ones would. I don't know what if anything should be done about that. I'm not sure anyone's ever even noticed, let alone complained about it.

  3. #13
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by Saffith View Post
    That sort of raises another point: weapon hitboxes are set up in the constructor, and weapons created by scripts always start out facing upward. Their hitboxes don't vary depending on their direction like built-in ones would. I don't know what if anything should be done about that. I'm not sure anyone's ever even noticed, let alone complained about it.
    That is a very valid point, and we should consider fixing it. Most of the time, users that scritpt weapons are content to correct the hitbox manually, but it would be better to start them with defaults that match their internal counterparts base don direction. This in theory, may affect some scripts, but it can be handled by the script metadata for 2.60. Alternatively, I can just modify CreateLWeaponDx to include this, and leave CreateLWeapon alone.

    In fact, that function may already fix this issue, but I doubt it. CreateLWeaponDx() is a new internal function, for the Screen pointer that forwards data from the itemclass information from an item to generate a weapon, as Lwpns.add() normally does. That forwards the sprites and other data values that a weapon uses when added, but I do not think that the hitbox sizing is part of that information as-is. The present arg order is :

    CreateLWeaponDx(int type, int parentitem);

    This could also be solved at the std.zh level, by adding a function that sets the hitboxes based on constants. That may be the most desirable method, as it does not force the change on anyone. IDK what is best here.

    Quote Originally Posted by ywkls View Post
    Whoops. I didn't understand what you meant the first time.

    EW_BEAM and EW_MAGIC both seem to share the rotated hitbox properties. At a guess, I'd say that this is either what makes them hurt Link, or is just that LW_REFBEAM and LW_REFMAGIC are basicially generated in the same fashion.

    Either way, looks like this may not be a bug after all; just an oddity.
    Not a problem. When you initially brought this up, I thought that you meant that a script generated reflected weapon had its hitbox rotated from what an internal reflected weapon (i.e, the identical type) has in the engine, but the issue that Saffith raises is quite valid. Script generated weapons do not inherit properly anyway.

    Reflected weapons are a bit strange in general though, so your confusion is understandable. The hitboxes are designed to fit around the default sprites, in theory. Some of this is going to be fixed by having weapon editor stuff in the future. In theory, I could make it possible to set these things in 2.54, but I would rather wait to see how this develops, so that I do not make a huge mess out of feature migration, and the need to preserve older stuff. (e.g. Adding weapon hitoffsets to the item editor, then needing to preserve that feature forever.)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social