A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Item Hover

Author Topic: Item Hover (3 messages, Page 1 of 1)
Moderators: Dennis

NeX
Joined: Apr 11, 2013


Posted: Jan 1, 2016 07:29 PM    Msg. 1 of 3       
Ok, I'm about out of ideas on this one -

I'm attempting to replicate the way item_collections (netgame_equipment) levitate, but with the actual equipment or weapon tag.


I've got a tiny test script that spawns a few items to try and get it working as a proof of concept, but I can't seem to get anything solid worked out.

Here's what I've tried and the results:

Teleport the item every tick:
- Lags up the rendering, showing the weapon flying up repeatedly from the spawn point. Completely unusable.

Teleport the item once after it "settles" on the ground:
- Closer to what I need, the weapon teleports up to the new "hovering" location and stays there as if on an invisible shelf. However, only an explosion seems capable of getting it down from this spot. Shooting it just causes the weapon to rotate as if it were on the ground. This is the closest behavior to what I need, but not falling after being shot makes it unusable in its current state.

Playing with the "Ignores Gravity" bit. I messed with this a few different ways:
- Write the bit to 1 immediately after spawn - this does nothing. The weapon falls to the ground as normal and has normal gravity behavior afterwards.
- Write the bit to 1 in the actual tag (not the object instance) before spawning. This should act as though the map were modified with eschaton or HMT, however it also seems to have no effect.
- Write the bit to 1 every tick. Still no effect.

For reference, I used Wizard's giant Lua file for offsets and memory mapping, and found that the "ignores gravity" bit is offset of (object_memory + 0x10), bit 2.
I have written and confirmed with a read that it stays the correct value, which makes it even more puzzling. From these results and the fact that I have played with that bitmask flag before, I have a hunch that the offset may be incorrect in its documentation. I'm burned out on this at the moment, but my next step will be to go over the weap/equip entities to see if this is the case.


I really am at wits end here - does anyone have any idea how to accomplish this, or has anyone ever seen it done before in an actual weapon/equipment item, not just using the "levitate" bitmask flag inside the item_collection tag?


This is the last hurdle to getting a complete dynamic spawning timer system working :/


EDIT: I looked at the entity, and found this:
<bitmask16 name="Item.Flags" note="" info="" info_img="" offset="0x17C" visible="true">;
<option name="Always Mantains Z Up" value="15"/>;
<option name="Destroyed by Explosions" value="14"/>;
<option name="Unaffected by Gravity" value="13"/>;
</bitmask16>;


so I tried a write_bit(map_tag_memory + 0x17C, 13, 1)

Still no luck. It's not in a struct, so it should be straightforward (and it didn't crash the server, so that's nice). This should affect all instances of the sniper rifle weapon, since I'm editing the actual weapon tag, not the instance of the object.

Halp plz
Edited by NeX on Jan 1, 2016 at 07:29 PM


EmmanuelCD
Joined: Jan 7, 2015

End my suffering


Posted: Jan 1, 2016 07:41 PM    Msg. 2 of 3       
but the equiment actually levitates, i use this on my last firefight, it falls after you grab the weapon


NeX
Joined: Apr 11, 2013


Posted: Jan 1, 2016 09:26 PM    Msg. 3 of 3       
Quote: --- Original message by: EmmanuelCD
but the equiment actually levitates, i use this on my last firefight, it falls after you grab the weapon


Firefight does not use a SAPP script, nor is it multiplayer. This is for stock classic maps.

The last portion about equipment falling after you grab it doesn't make sense either

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:15 AM 109 ms.
A Halo Maps Website