|
Engineabsturz ohne Fehlermeldung...
#15892
07/10/03 22:56
07/10/03 22:56
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
OP
Senior Developer
|
OP
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
Hallo! Dieser Code führt zu einem Engineabsturz ohne Fehlermeldung.. code:
/////////////////////////////////////////////////////////////////////////// function wand_event() ;//vordefinieren der Funktion
action Wand { my.enable_impact = on;//achte auf Berührungen my.event = wand_event;//wenn berührt worden, führe and_function aus }
function wand_event() { if(event_type == event_impact)//ist der Event berührung? { phent_settype(ball2, 0, 0);//der Ball ist kein Physikobjekt mehr. //bewege den Ball an die anfangs Position ball2.z = ball.z; ball2.y =ball.y; ball2.x =ball.x;
//p_engine();//ordne dem Ball wieder eine Physikengine zu } } ///////////////////////////////////////////////////////////////////////////
Für hilfe gibts Sterne!
mfg burnner
|
|
|
Re: Engineabsturz ohne Fehlermeldung...
#15896
07/11/03 03:58
07/11/03 03:58
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
OP
Senior Developer
|
OP
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
quote: Originally posted by napo: Vielleicht sind ball oder ball2 leere Pointer.
Nein.. die werden oben gefüllt...
|
|
|
Re: Engineabsturz ohne Fehlermeldung...
#15898
07/11/03 04:04
07/11/03 04:04
|
Joined: Mar 2002
Posts: 801 Switzerland, Zürich
napo
Developer
|
Developer
Joined: Mar 2002
Posts: 801
Switzerland, Zürich
|
aus dem Handbuch: quote: When called with 0 as type parameter the entity is reversed to a standard GameStudio entity and is no longer by controlled by physics. While you can continue to read the object's position and orientation, once an entity has been registered, you can no longer directly change its position (x,y,z), orientation (pan, tilt, roll), or scale. Use phent_addforce to impart forces on the object instead. If you need to directly change position or orientation, you can temporarily disable the entity using phent_enable.
d.H settype(ball,0,0) ermöglicht keinen Schreibzugriff auf die x,y,z und pan,tilt,roll Werte der Entity. Du musst phent_enable(ball,0) benützten.
|
|
|
Re: Engineabsturz ohne Fehlermeldung...
#15899
07/11/03 05:50
07/11/03 05:50
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
OP
Senior Developer
|
OP
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
|
|
|
Re: Engineabsturz ohne Fehlermeldung...
#15900
07/12/03 03:01
07/12/03 03:01
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
quote: Originally posted by napo: d.H settype(ball,0,0) ermöglicht keinen Schreibzugriff auf die x,y,z und pan,tilt,roll Werte der Entity. Du musst phent_enable(ball,0) benützten.
Nein! Es ist genau umgekehrt. Der Absatz im Handbuch bezieht sich auf Objekte die settype(RIGID) gesetzt haben, da werden position und rotation ignoriert (egal ob phent_enabled oder nicht). Nach settype(0) ist es wieder eine gewoehnliche GameStudio ENtity.
|
|
|
|