Liquid as vacuum and conditional projectiles

Discuss map ideas, techniques, and give help.

Liquid as vacuum and conditional projectiles

Post Mar 3rd '18, 00:38

i'm working on a map that uses the Jjaro liquid type as vacuum. Why would i do that? Because a major part of the level involves moving between oxygenated 'indoor' spaces and 'outside' vacuum spaces via realistic airlocks. Marathon Evil was (i think) the first to use airlocks for liquids, so i thought, why not do the same with vacuum?

The basic vacuum environment is easy, just a matter of tweaking the under-media fader, and removing the 'underwater' ambient sound and the enter/exit liquid sounds—a short MML script. It's also reasonable to leave most of the weapons alone; it's okay that the magnum, assault rifle, etc. don't fire in vacuum. But the outlier is the fusion pistol. It's also where this starts to sound like a stupid question: is there any way to make the fusion pistol fire normally under media (i.e. as a projectile, without the electrocution damage to the player and nearby monsters)? i've tried to do this using the physics model, but to no avail.

Ideally, if it were possible, i'd like to make the physics of weapons fire in different media conditional; i.e. a grenade fired normally, outside of a liquid, is affected by gravity, but if fired in 'vacuum', it would have no shot drop. Or, firing the fusion pistol under water electrocutes the player, but fires normally (without damaging the player) in 'vacuum.'
User avatar

ktaur

Post Mar 3rd '18, 04:29

If I'm remember correctly that the fusion's behaviour is hardcoded, then my only idea is to maybe make it do 0 damage in the physics, then using lua create a new projectile whenever the fusion is fired in polygons with a certain tag. It's been a long time since I wrote any lua so i'm not 100% sure, but I think that would be possible.
User avatar

$lave

Post Mar 3rd '18, 05:06

In the lower right of both ShapeFusion and Anvil, go to the shot, tick the "Penetrates Liquids" flag, and underneath all the flags, change the "Media Impact" from "Fusion Media Backblast" to "None."

I'd like to set up vaccum areas myself, how do you disable swimming?
User avatar

ravenshining
Hawai'i

Post Mar 3rd '18, 23:52

Thanks, $lave. That's a really interesting solution; i'll have to play around with it a bit. It might be useful for a whole bunch of other things, as well.

Admittedly, i was mistaken about the changing fusion behavior in the physics model—indeed, checking "penetrates liquids" and changing media impact to "none" does the trick.

As for disabling swimming, ravenshining, i'm not sure yet. For my purposes, i don't mind the swimming effect, but i'd like to modify it so that movement feels more like realistic zero-g. That might be a job for Lua, though i'm not nearly as good with it as i'd like.

Thanks!
User avatar

ktaur

Post Mar 4th '18, 00:44

As an alternate approach, it may be easier to implement the vacuum effects with lua instead of fighting against it. You could disable firing of certain weapons and drain the player's oxygen in certain areas pretty easily. The tricky part would be identifying the vacuum areas, but you'd have a few options available.
User avatar

Wrkncacnter

Post Mar 4th '18, 01:54

I guess you can either mark vacuum areas using polygon types but then of course you can't have platforms etc. in vacuum areas. Otherwise I guess you could probably place objects that "create" vacuums if you're in a certain radius, or on the object's polygon?

but really I think you should just fill the map with invisible oxygen ticks everywhere
User avatar

$lave

Post Mar 4th '18, 02:07

I was thinking more, use a liquid underneath the map. Lua can detect if there's media in a polygon. This assumes you can turn off the liquid sound, but you're already messing with that stuff anyway.

Other options: Base it on whether there's a certain ambient sound assigned to the polygon, annotations to mark polygon (annoying as hell, but you can delete them in init() so they don't appear in the overhead map).

I'm sure there are other ways of doing it if you get creative.
User avatar

Wrkncacnter


Return to Mapping



Who is online

Users browsing this forum: No registered users

cron