Intense X Copper + own physics

Posted By: MDMDFSS

Intense X Copper + own physics - 06/08/09 11:35

Why does that don`t work?
:

______________________________________________________________________________
#include <IntenseX.h>//I know this is not the problem


ENTITY* eBall;


void main()
{
video_mode = 10;
video_screen = 1;
shadow_stencil = 3;

ENTITY* sky = ent_createlayer("skycube+6.dds", SKY | CUBE | SHOW, 0);
sky.z = 30;
}

action rock()
{
set(my,POLYGON);//I know this is not the problem
set(eBall,SHADOW);
phent_settype(eBall,PH_RIGID,PH_BOX);
phent_setmass(eBall,50,PH_BOX);
phent_setfriction(eBall,48);
phent_setelasticity(eBall,15,10);
phent_setdamping(eBall,20,20);
ph_setgravity(vector(0,0,-600));
}

Without action rock() and ENTITY* eBall; works evrything fine.

But wenn I open The level, it gives me for every model that I gave the action (action rock) an error:

//crash with rock!//

What is wrong???
Posted By: alibaba

Re: Intense X Copper + own physics - 06/08/09 13:34

include this to your action
eBall = me;
Posted By: MDMDFSS

Re: Intense X Copper + own physics - 06/08/09 14:31

now it works!

Thank you man.
Posted By: MDMDFSS

Re: Intense X Copper + own physics - 06/09/09 11:55

But I still have another problem.

Wenn I shoot or hit a stone nothing happens, I think that is because the bullets from Intense X are passable (I don`t know wy), but how can I still shoot my physicobjeckts so thaz they fly all over the place???

here is my main code (physicobjeckts):

___________________________________________________________________________________________________________________

#include <IntenseX.h>


ENTITY* eBall;



void main()
{
video_mode = 10;
video_screen = 1;
shadow_stencil = 3;

ENTITY* sky = ent_createlayer("skycube+6.dds", SKY | CUBE | SHOW, 0);
sky.z = 30;
}
//What can I add to rock???
action rock()
{
eBall = me;
my.emask |= ENABLE_SCAN;
my.emask |= ENABLE_BLOCK;
set(my,POLYGON);
set(eBall,SHADOW);
phent_settype(eBall,PH_RIGID,PH_BOX);
phent_setmass(eBall,50,PH_BOX);
phent_setfriction(eBall,48);
phent_setelasticity(eBall,15,10);
phent_setdamping(eBall,20,20);
ph_setgravity(vector(0,0,-600));
}

action stone()
{
set(my,POLYGON);
}
Posted By: MDMDFSS

Re: Intense X Copper + own physics - 06/11/09 10:01

Hallo?????
Posted By: alibaba

Re: Intense X Copper + own physics - 06/11/09 10:11

please wait some days. i´m trying si solve this prblem.
i´ve IX ,too.
Posted By: darkinferno

Re: Intense X Copper + own physics - 06/12/09 14:41

you need to apply a force to the ball when it gets shotted, search the manual for event_shoot and phent_addforelocal....
Posted By: alibaba

Re: Intense X Copper + own physics - 06/12/09 21:59

i know this but it doesn´t work.i think the bullets have another .push.
Posted By: the_mehmaster

Re: Intense X Copper + own physics - 06/14/09 08:03

you should ask LarryLaffer, he programs this
Posted By: slacer

Re: Intense X Copper + own physics - 06/14/09 08:41

There is a new post about physics with Intense X in the Intense-I Forum showing how to do it.

I had to search for event handling in Intense X source code to find they are using SHOOT events to detect the bullets...

Intense Forum - physics thread

-- slacer
© 2024 lite-C Forums