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
    4 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    244
    Level
    5
    vBActivity - Bars
    Lv. Percent
    77.07%
    Daily Activity
    0%
    Weekly Activity
    0.56%
    Monthly Activity
    2.62%
    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
    34
    Posts
    3,355
    Mentioned
    164 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,031
    Level
    24
    vBActivity - Bars
    Lv. Percent
    3.04%
    Daily Activity
    0%
    Weekly Activity
    0.56%
    Monthly Activity
    5.24%
    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.
    [téknolŕiz]

    ffcscript.zh 1.1.1 - Updated 2014-08-19
    ghost.zh 2.8.2 - Updated 2017-09-10
    tango.zh 1.3.0 - Updated 2017-09-10

  3. #13
    ZC Contirbutor ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,028
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,580
    Level
    19
    vBActivity - Bars
    Lv. Percent
    16.29%
    Daily Activity
    0%
    Weekly Activity
    0.56%
    Monthly Activity
    2.62%
    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.)
    Last edited by ZoriaRPG; 09-18-2017 at 08:06 AM.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

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