Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (NnamueN, Akow, 1 invisible), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Registering an existing entity as a physical object #253671
02/25/09 23:28
02/25/09 23:28
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Hi there!

Here's the thing: I have an object that is moved with the c_move. I want to register it as a physical object when it hits something. Obviously, I stop using the c_move at this point.

But it doesn't work, it says it's not a registered physical object. But the strange part is.. I press 'ok' in this error message over and over again and I see my object falling behind it! o_O

I'm probably doing something stupid.. any ideas? Maybe a better solution. (I tried to remove this entity and create a pjysical one in it's place, but didn't manage to make it work)

Re: Registering an existing entity as a physical object [Re: DiegoFloor] #253679
02/26/09 00:00
02/26/09 00:00
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Does your object have a trigger event?

Ottawa smile

Re: Registering an existing entity as a physical object [Re: DiegoFloor] #253695
02/26/09 05:32
02/26/09 05:32
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Better make your objects a physics entity from the very beginning. You will have to apply a force to it if you want it to move; check Aum62's plug and play article for an example.

Re: Registering an existing entity as a physical object [Re: George] #253743
02/26/09 14:52
02/26/09 14:52
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Ottawa: I've read about this a lot in the manual, but i'm not even sure what it is! Do you think it may have something to do with the problem?

George: Yes, I know I can't move a physical object with c_move. But there isnt anything saying I can't register a "previously c_moved object" as a physical object and start applying forces. (apparently, i can't!)

Re: Registering an existing entity as a physical object [Re: DiegoFloor] #253779
02/26/09 19:47
02/26/09 19:47
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
This works but (as you have experienced already) causes problems; registering the physics entity takes some time.

Re: Registering an existing entity as a physical object [Re: George] #253888
02/27/09 14:47
02/27/09 14:47
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

George : When you says "takes some time" Do you mean that
a while (isbeingcreated) code should be used to wait for
the physics to do it's work?

Ottawa smile

Re: Registering an existing entity as a physical object [Re: Ottawa] #253908
02/27/09 16:20
02/27/09 16:20
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Something like a while (isbeingcreated) - if not too slow - could be a solution!

Let me explain the problem, maybe you guys have some ideas.. I want the player to be able to throw 'rope arrows'; something that sticks to the surface and constraints itself with the player (how the rope itself is gonna work i'm not sure yet)

Possible solution: So, if I can't create this objects in realtime, i'll keep'em hid until the player fires one of them (there are exactly two!). But then, it seems a waste of resources to make a complex algorithm to reposition the physical arrows back to the player (it'll be invisible, see)

Another possible solution: The arrows are not physical objects. But, can I constraint something to a not physical object?

Re: Registering an existing entity as a physical object [Re: Ottawa] #253917
02/27/09 18:09
02/27/09 18:09
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Ottawa: the physics entity isn't registered instantly, so we can't trigger its change in the event code.

Re: Registering an existing entity as a physical object [Re: George] #253927
02/27/09 19:10
02/27/09 19:10
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

George : thanks smile


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1