Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Static physics for carried entity
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#1
Static physics for carried entity

Hi

does anybody know how it's possibly to set an entity which is carried around by the player to static physics mode?

It seems that SetPropStaticPhysics() is only working when the player isn't carrying the entity. Or maybe there is another way to fixate an entity if a player moves it into a script area?


Thanks
10-17-2012, 02:46 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Static physics for carried entity

Tick static physics in the entity tab. That should work.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-17-2012, 02:53 PM
Find
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#3
RE: Static physics for carried entity

Thx, but I want to disable physics ingame with a script, while the player is carrying the object.
10-17-2012, 02:55 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Static physics for carried entity

Please, tell me the exact situation. What should be static? And how would be the process? Touching an area?

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-17-2012, 03:01 PM
Find
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#5
RE: Static physics for carried entity

The player is carrying an entity around by clicking and holding left mouse button. If the entity collides with a script area, physics for the entity should be disabled, therefore the player can't carry it anymore and it remains at the position.

Everything is working fine in my script except disabling the physic for the entity. I checked the functionality by using SetEntityActive() and it worked, means that I carried the entity in the area and it disappeared. This was only for testing purposes however, I don't want it to disappear, I want it to remain in the area.

So the only problem is, that apparantly you can't set disable physics for an entity while it is beeing carried around.

Oh and thanks for your quick answers Smile
(This post was last modified: 10-17-2012, 03:11 PM by craven7.)
10-17-2012, 03:09 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#6
RE: Static physics for carried entity

Off-topic: My other post was my 300! Yay Big Grin

Topic: Then you could use sticky areas, because I think you want to put a sort of orb in a pedestal, right? Wink

Make a sticky area, and put the necessary names. When the entity collides with the sticky (if the sticky has the name of the entity in the Allow attach or something like that) the entity will move by itself to the center of the sticky area.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-17-2012, 03:19 PM
Find
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#7
RE: Static physics for carried entity

Lol, nope, no orb... actually some body parts^^

Oh... didn't know about sticky areas, will look at them... what a shame xD I already coded everything and it is working if you throw the entity in the area or let it drop in the area.
10-17-2012, 03:25 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#8
RE: Static physics for carried entity

Well, is "AttachableBodyName". There, put the name of the entity. When the body part touches it (how sweet! Angel) it will move to the immediate center of the area.
You can also modify how is the body moved, what rotation, etc.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-17-2012, 03:29 PM
Find
craven7 Offline
Member

Posts: 50
Threads: 8
Joined: Aug 2012
Reputation: 1
#9
RE: Static physics for carried entity

Thanks, I don't have time to do it now, I'll try tomorrow.

thank you.
10-17-2012, 04:18 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: Static physics for carried entity

We are here to help Wink

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-17-2012, 04:48 PM
Find




Users browsing this thread: 2 Guest(s)