Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, akn, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

15

Cobalt

32

Turquoise

10

Cyan

11

Royal

9

Teal

3

Onliners

16 mins

Jessie

23 mins

Windawz

24 mins

Penguinboy

33 mins

Shepard62700FR

59 mins

Solokiller

1 hours

fighter667

2 hours

Ghost129er

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Toggle Gravity

[1]

Forums > HL Engine Discussion

05 Nov 17, 09:35
By olograph
avatar
Member
Is it possible to toggle gravity? I'm trying to control this using masters but I fail.

I have a button, two multi, two changetargets and two multisources. The button targets multi1. Multi1 and multi2 both point on their respective multisource and changetarget which switch which multi the button points to. I have two trigger_gravity, one at 0.3, the other 1 set to their respective master.

Please someone confirm this is not doable.

Edit: I tried the edit button and it's great!
05 Nov 17, 16:01
By Windawz
avatar
Member
Upload your map and give us a link to it if you don't mind. I can try to figure out what the problem is.
05 Nov 17, 22:57
By olograph
avatar
Member
I've been questionning on my hesitation on sending a map of a decades old game to someone else...

...still I rather not. I'm trying pretty special/fancy stuff with tons of triggers and I rather not share before the time. I'll create a test map soon and see if I can reproduce and send it to you.

In the meantime, thanks x 100
07 Nov 17, 03:57
By olograph
avatar
Member
OK, I created the most basic example: http://www.filedropper.com/test_413

Basically, you have a trigger_gravity set at 0.3, its master, a multisource and a button that targets that multisource.

Without the button being active one would expect the trigger_gravity to be turned off, but it's not.
07 Nov 17, 18:31
By Windawz
avatar
Member
Quote:
"Without the button being active one would expect the trigger_gravity to be turned off, but it's not."


Ah, now I see what's the problem. Trigger_gravity doesn't affect the gravity itself in its area. It works like trigger_multiple, but instead of targeting an entity it just changes the gravity for the player who activated it. To get their gravity back to normal, the player must activate another trigger_gravity that will set the player's gravity back to normal.

EDIT: Made some tests and I fear it's impossible to tie a trigger_gravity to a master. Here's the map I tested it on.
08 Nov 17, 14:23
By olograph
avatar
Member
Thanks Windawz. It doesn't matter. This thing was a nice to have for me.
13 Nov 17, 16:52
By olograph
avatar
Member
I had a crazy idea.

Divide a room into squares. Each square being a trigger_teleport with a teleport_target. Each trigger_teleport has a multisource as a master and is thus toggle-able.

When you want to change gravity, teleport the player within the square to a room with a different gravity then teleport him back.

The result is more or less seamless, but it would work. : )
Add a bit of makeup (effects) and voilà.
13 Nov 17, 23:19
By Jessie
avatar
Ladytype
You would always end up teleporting back to a fixed point in each area (and facing a certain direction), though. Maybe that would work for your purposes, but I wouldn't call it "seamless". The smaller you make the squares, the more accurate it would be, but you'd also shoot up towards the entity limits pretty fast.
[1]

Forums > HL Engine Discussion

Login to Reply

You must be logged in to reply.