Author Topic: How to make an object fall down due to gravity?  (Read 251 times)

RickyB

  • Posts: 753
If I place an object somewhere in the air, it will just stay there, hovering. I wonder how I can make it react to gravity, so that it will fall to the ground?
Maybe even a few seconds after the map loads?

Speedevil

  • Posts: 711
I think objects are only activated when a car touches them.

The Very End

  • *
  • *
  • Posts: 2449
As Speedevil her tells, think they are just active when a other object or car hit them. You could try to play around with the .agan files and see if there is some fun to there (just follow the animation_coliding object to see how these files references to each others and works).

RickyB

  • Posts: 753
I was afraid that this could be the case.

I think I remember you (TVE) making a timed explosion on one of your tracks, not sure where or how it was done. But with that in mind... now I'm thinking, maybe an explosion could trigger the gravity to kick in, as it does make objects react to gravity without beeing touched by a car. Maybe if I place a timed explosion near an object it will fall down.

The Very End

  • *
  • *
  • Posts: 2449
Yeah that would work, or an invisible / not visible object that simply touches your object :)
Or you could try starting the object this way and see if it works; Look at the gasbottle files for more info, but short sumarized:

1: Create a dntp file for the object and make sure it's default effect / on hit effect links to a somename_trigger.fxtr file (think trigger is important somehow)
2: In this trigger file, you can start various stuff (in addition to "start" the object). The filetype you are looking to start is the erft type
3: In the erft you have an x / y value, where I think x is the least amount of time before an effect start and y the longest, then it is random in between.
4: Now in this erft file you THEN link to a new fxtr file with the thing you want.

Make sure that you create NEW files, by copying them things do not work. Trust me, I once used a week to understand this the hard way. Allways create new files of the right type from scratch.
« Last Edit: July 19, 2018, 01:46:57 PM by The Very End »

RickyB

  • Posts: 753
Thanks a lot for that short summary, End ! :) Will try to work through that sometime. Alredy found one single ertf file called randomtimedexplosion.ertf. Also thanks for emphasizing on making new files instead of just copying them... Probably saves me a lot of time and nerves :)

Maybe one more thing... when you say "an invisible object that simply touches your object" ... wouldn't the invisible object have to move towards the hovering object and then touch it? That would be a different solution without any explosions, right? 

The Very End

  • *
  • *
  • Posts: 2449
No worries, and you are right regarding moving. Think I once did a explosion at random time. If you want to cheat the gravity you can make an random explosion without visible effect, then players won't see what started it but look like an gravity based object. A other option would be to see to the force (effo I think) files. Here you can push objects with force, and I think that should work too. Never tried it but that is what happens with the gasbottle.
« Last Edit: July 19, 2018, 02:15:24 PM by The Very End »

Purple44

  • *
  • Posts: 8413
I use strawbales to trigger the gasbottle rockets and to explode the rock piles ( End made me moveable rocks :) ) in my Sandpit 1 Etreme Reverse track. Could take a look at my Gokart Raceway Plus mod and go to \objects folder and find my strawbale object files with Bagedit, then follow what countdown_timer dntp file points to. I do use a random file and use a range like, 100-150, so there no exact time when my gasbottles get trigger. Every race a little different.



Flatout Joint, where the mods were.

i5 2500 i7 8700, 16GB, Nvidia 660 960 1060 6GB, Win 10 64bit, DFGT Wheel