Scripts / G. G. Max script to mamipulate door script

Author
Message
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 16th Mar 2021 22:13
Hi just a maybe a good idea how to get to remove collision from door script i have edited the script a few errors and none effective.

What i am wanting is to lower my cage till it reaches the ground with the collision still on. so a kind of mouse trap. its animated. so all i need to do is animate to close and amimate to lift with collision on.

I also tried to have it trigger zone drop but it drops and slowly bounces of me to the floor amd. Unable to enter it. Changed the collision to 11 and 1 no. Joy
So. Any pointers be greatly appreciated

Sb
an unquenchable thirst for knowledge of game creation!!!
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 17th Mar 2021 06:17
Lightening from a thunderstorm threw the power off here- with a loud blast outside our door!
So-- now checking if my computer is fried or not. Aside from highly intrusive, annoying
Billy Gatekeeper (aka Microsoft Windows Den), notifications; sign up for this, and sign up
for that garbage- it seems like it avoided the fray...

@science boy -- GG Jr - right?
"how to get to remove collision from door script"
"but it drops and slowly bounces of me to the floor amd. Unable to enter it. "
? Meaning it bounces/slides OFF the top of you (1st Person) player as you stand under it?

This is an animated object? and it doesn't keep the collision?-- because most animated objects I've experienced seem to be able to effect a moving collision capsule, but haven't tried what you are suggesting. Or it's one single object you have animated in a vertical movement?

Anyhow I posted a similar question regarding the collision shape on dynamic >>regular<<, >>NON animated<< entities scripted to move. People said most of the time (or always of course), the collision box defaults to a cube (if I recall correctly). There was a certain object however I tested that portrayed some behavior of mesh constrained collision (mode 3 I believe- though in good GG form, the collision wasn't vigorous enough to really utilize as is.)

If just the door is animated, but you chose to hack it and separate the cage door from the cage box, or you want to turn it into an NON-animated object and move it with scripts, perhaps (depending on if GG wants to be helpful or not), this common practice may work;

CollisionOff(e)
SetPosition(e,x,y,z)
ResetPosition(e,x,y,z)
CollisionOn(e)

But then again-- as mentioned IDK? Maybe animated don't have mesh shaped collision? smallg suggested back then to move 4 (or 5 with floor or ceiling) objects in tandem to get a hollow, cubical collision configuration. How about that?
Good luck, see ya in maybe ~12 hrs- weather permitting.
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 17th Mar 2021 06:19 Edited at: 17th Mar 2021 06:21
Told ya it was late...?
sorry double post...
PM
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 17th Mar 2021 11:55
No problem thank you

I have a cage and seperate door i found worked the best.
What i am aiming is for a cagebwith no floor to either drop over the character or to animate drop over the character to trap the player if they are not quick enough. So i looked at just physics and animated
All i need is an animation with the collision intact but not box
an unquenchable thirst for knowledge of game creation!!!
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 17th Mar 2021 18:32
@ science boy
Quote: "Unable to enter it. Changed the collision to 11 and 1 no. Joy"


Apparently, it is not possible to calculate the collision of an object that is not level with the ground.
I don't know what your cage is like, but I have modeled a cylindrical cage with holes and no floor, this makes it a model with a more complex geometry for GGMax than let's say a compact box.

In the case of a cage, you have to work with a convex hull via a fpe file.
collision = 9
This works well for a static and ground-level cage, for a dynamic cage, running a script, animated, and hanging from the ceiling, I don't know how to assign collision.

The only solution is to work with two cages, one static and one dynamic, hide and show the cages conveniently to create the illusion and effect that you are looking for.

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 17th Mar 2021 18:44
"All i need is an animation with the collision intact but not box"
Wish it where that simple...

Try IsImmobile = Yes and let's see if anything is different? As I explained, you are probably working with a cubical
collision box, yours is a unique situation that the same settings as a doors will not fix. What is your .fpe collision?

Here -- https://forum.game-guru.com/thread/222493
AE said this; "All dynamic entities automatically get either box, cylinder, or spherical collision. Polygonal collision is not supported when an entity is dynamic, meaning there is no way to have a dynamic basket you can put stuff in."
smallg said; "or convex now"
Not sure how you go about tagging the object with them specifically because how is "automatically" determined??
as pointed out my settings in .fpe where ignored by the dynamic object.

AmenMoses said; "attach simple shapes together to make a more complex shape like a box and then position a non collision shape in the same place to give the visual look you want."
you would make the collider objects invisible / Hide(e) / and physics off on the model CollisionOff(e) without putting back on. I suggest the latter when all else fails. Hope that helps. You could make one simple script and put it on all collider objects if it comes straight down, and then just tweak the CollisionOff(e) as just stated for the model. You need a door to open after getting trapped?

For certain situations, coding movement is better suited than animations. Let us know if you need help with the move trap down script.
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 17th Mar 2021 19:47 Edited at: 18th Mar 2021 03:43
Cage drop script;
GetPlayerDistance(e) has changed since previous versions so ... watch out for that.
I would have kept it working as it was-- then allow for separate 'Y' check.

Lines 42, 43;
This was tested on the aqueduct water "con_pipe" in "Cityscape" . The rotation is set for that--
change to all zero's (just don't call me, I'm not an attorney) for your model.
The "trap" will behave with physics and roll off player if set to IsImmobile = no but it will drop with gravity that way.
Nevertheless, I suggest the manual drop with IsImmobile = yes to erase those concerns.

PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 18th Mar 2021 03:09
**updated script** updated @ post above

I just glanced at that script... hmmm...??
lines 32, 33
g_PlayerPosY = 0
g_PlayerPosZ = 0
?? weird I don't know where that stuff came from? I thinks it need to be removed...
just residuals left over from the player distance update.

So it seems like 40 as a distance might be too small, probably make it a bit larger-- 80?
depending upon your use case. Also a 'bashing out' function was added to escape from
the cage-- that way you can re-test the script if multiple cages are put on map, or you can
make it a "master access key" that you steal from the illagers that opens every door in
the entire solar system!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Mar 2021 19:11
"Mamipulate", snigger.
Been there, done that, got all the T-Shirts!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 18th Mar 2021 20:29
It looks like the issue comes because the player is inside the collider object (the cage) when the collision comes.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 18th Mar 2021 23:04
@ gubbyblips thank you i will test on Saturday as work commitments are in the way.
@amen i'm laughing. Now
I wrote on my mobile and its Huawei trash and its not the best phone. contracts up next month. Back to samsung.

Also i need reading glasses so a mix created the error.

3com i will test and see what happens worth a try

Thanks all for your input its very appreciated
an unquenchable thirst for knowledge of game creation!!!

Login to post a reply

Server time is: 2024-04-20 00:01:30
Your offset time is: 2024-04-20 00:01:30