Scripts / [SOLVED] Indianna Jones Rolling Boulder

Author
Message
benjiboy
7
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 9th Mar 2020 20:03
Has anyone done this? Can I buy a set? script/boulder/trigger/release?
You can't teach an old dog.

The author of this post has marked a post as an answer.

Go to answer
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Mar 2020 20:44 Edited at: 9th Mar 2020 20:46
This post has been marked by the post author as the answer.
If you use a boulder model and set it to collisionmode=2 in the fpe file than it will roll like a ball.

Make active, physics on, issimobile=no.

If you want it to hold in place until triggered use ConstrainObjMotion( obj, 0, 0, 0 ) in the _init function (note that is the object Id not the entity id, i.e. g_Entity[e].obj ). Then in the _main function do :

if <trigger> then
ConstrainObjMotion( obj, 1, 1, 1 )
PushObject( obj, 0, 0, 0 )
end

Replacing the trigger part with the appropriate logic.

If you want it to hurt the player simply check if player is closer than roughly the radius of the boulder.

Oh and move the boulders origin to be in the centre of the model.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Mar 2020 23:47
yep i did some trap scripts a few years ago - might also give you some helpful hints
temple entrance
landslide
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
benjiboy
7
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 10th Mar 2020 05:48
Big thanks to both of you.
You can't teach an old dog.

Login to post a reply

Server time is: 2024-05-02 22:36:37
Your offset time is: 2024-05-02 22:36:37