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 Technical / Map Design »Flak weapon system questions

Author Topic: Flak weapon system questions (5 messages, Page 1 of 1)
Moderators: Dennis

A Juicy Frank
Joined: Oct 28, 2013


Posted: May 11, 2014 01:36 AM    Msg. 1 of 5       
So recently I've been wanting to create some kind of flak weapon system, similar to http://youtu.be/2Nj58znu8nw?t=28s.


The first method I've tried involed creating a new collision model for the banshee that added a crude spherical orb around the plane. The orb is set to an unused material (engineer), and the flak projectiles are set to detonate on this material while all others are set to overpenetrate it.

New banshee collision model. Pretend that rectangle is the shee:




After discovering that the normal weapons would end up shooting through the entire model despite layering the shee underneath the orb, I decided to export the orb as its own object and use scripts to attach to the stock banshee. I expected the spherical object to trasfer damage as normal after doing some tricks to have the orb retain its engineer material, while allowing the non-flak projectiles to react to the banshee underneath. Unfortunately, this method didn't work either, as the same problem persisted. Here's some in-games-

Flak projectile reacting to the invisible outer sphere:



Regular projectiles 'overpenetrating' through the outer sphere, and continuing through the 'metal (thick)' materialed banshee underneath:




So I'm at a bit of a stand still here, not knowing exactly how to proceed. What I need is some kind of mechanic that will allow the flak projectiles to react to the banshee some distance away from it while allowing other regular projectiles to disregard everything else and react to the banshee normally. Thoughts? Suggestions?


altis94
Joined: Oct 5, 2012

Join my Discord https://discord.gg/GDVEaRD


Posted: May 11, 2014 09:16 AM    Msg. 2 of 5       
Maybe make projectiles destroyable using collision model and add a damage effect to banshee with a large radius which would only affect that projectile.


nihao123456ftw
Joined: Mar 24, 2012


Posted: May 11, 2014 08:06 PM    Msg. 3 of 5       
this might or might not work:

with your method of having the sphere being a different object and is being attached to the shee via scripts, maybe try having the script constantly detach and reattach the sphere, maybe the proper collision models will activate during the time the shee and the sphere are not attached, because the problem with your method is that it seems like the banshee's collision model gets deactivated once you attach the sphere to it, so the regular projectiles don't detect it.


EDIT:: I just realised this might not work, since a fast moving projectile like a bullet may be able to move directly through the banshee between the update frame where the sphere is attatched to the shee before the next frame is called to deattatch the sphere and activate the shee's collision model...
Edited by nihao123456ftw on May 11, 2014 at 08:11 PM


A Juicy Frank
Joined: Oct 28, 2013


Posted: May 12, 2014 06:29 AM    Msg. 4 of 5       
Thanks for the posts, gents. Got back after some experimenting, Mother's Day, and a nap with some updates:


I had known that projectiles could reference a gbxmodel (rocket launcher, fuel rod, grenades...), but I've always assumed that the collision was taken care of by the projectile's 'collision radius' value under the '$$$ PROJECTILE $$$' section. Even though not all stock projectiles that use a gbxmodel have this field filled, it's used with the rocket launcher and the flamethrower, so idk.

Now, after creating the .damage_effect, referencing it as one of the banshee's "attachments", and giving the flak projectile a crude collision model, the projectile seemed to act as I would expect a normal projectile to- not reacting to anything but the banshee's collision.






This was quickly fixed by the addition of a gbxmodel to the projectile. Weird, but alright.



The issue of regular projectiles not reacting to the banshee have been alleviated, and the flak projectiles now take damage when in proximity to the banshee. Perfect, except for 3 things. It turns out that despite the flak projectiles 'dying' to the .damage_effect, it looks like the projectile itself just keeps on going (see above picture). Because the explosion is placed in the 'body depleted' field, a quick test proved that a flak projectile flying through the radius of 2 banshees (one after another, in line) will only detonate on the first one it passes through. The problem here being that the model is still visible when it should have been destroyed, and that the projectile will still react to and produce impact damage on any other materials it comes in contact with. I haven't tried yet, but I would assume that creating a ~damaged permutation for the projectile that does not contain any geometry would at least cover the first problem. For the second, this means there can't be any reliable impact damage for the flak projectile getting direct hits on targets.


Also this happens when shields are down:





In addition, the .damage_effect doing 0 damage to the cyborg's two materials is somehow still enough to keep the pilot or anyone near the banshee's shields stunned. This is gonna be fun. Despite these bugs, I will continue to experiment with this method, as it seems it will be the easiest and most effective way to implement flak weaponry in both single and multi player maps without the need for OS.



Nihalo, I know exactly what you're getting at. The orb system was fool proof until the engine decided it wanted to treat singular collision models and 2 attached objects the same way. It's actually a good thing the engine does this, as it helps to prevent projectiles being able to do double damage in some scenarios. If all else fails with the .damage_effect method above, OS does allow me to check and directly update an object's position:

(script startup setorbup
(object_set_collideable orb false)
(object_set_scale orb 1.33334)
)

(script continuous repositionorb
(object_data_set_real orb position x (object_data_get_real banshee position x))
(object_data_set_real orb position y (object_data_get_real banshee position y))
(object_data_set_real orb position z (object_data_get_real banshee position z))
(sleep 1)
)


I'll just have to rely on the flak's explosion dealing the damage, instead of having the orb transfer the damage to the banshee and/or its pilot.


Let's see how this goes.


altis94
Joined: Oct 5, 2012

Join my Discord https://discord.gg/GDVEaRD


Posted: May 12, 2014 09:10 AM    Msg. 5 of 5       
In collision of projectile find "body destroyed threshold" and set it to something like -0.1. I'm not sure about that damage effect hurting player... maybe you could uncheck "passes area damage to children" (if banshee is destroyable) in banshee collision and make damage effect appear only when banshee is occupied.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 8:15 AM 282 ms.
A Halo Maps Website