Gamestudio Links
Zorro Links
Newest Posts
Stooq now requires an API key
by k_ivan. 06/10/26 14:39
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 6,529 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
physX explosion #340170
09/01/10 16:48
09/01/10 16:48
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
So why is this not working?
I can`t find a damm wrong thing... confused

Take a look at it;

VECTOR temp_dir;
VECTOR ex_dir;

function physX_boom()
{
my.event = NULL;
set(my, PASSABLE);
set(my, INVISIBLE);
ent_create("explo.tga", my.x, explo_sprite);
effect(fire_effect, 1000, my.x, nullvector);
effect(smoke_effect, 100, my.x, nullvector);
my.alpha = 100;
set(my, TRANSLUCENT);
while (my.alpha > 0)
{
my.alpha -= 1 * time_step;
wait (1);
}
wait(1);
c_scan(my.x,my.pan,vector(360,0,1000),IGNORE_ME);
if (event_type == EVENT_SCAN)
{
vec_set(ex_dir,you.x);
vec_set(temp_dir,my.x);
vec_sub(temp_dir,ex_dir);
vec_normalize(temp_dir,1000-result);
pXent_addvelcentral(me,temp_dir);
}
}



Of course the PhysX objets are set my.emask |= ENABLE_SCAN;.

So could it be that my mistake is in the function
pXent_addvelcentral(me,temp_dir);,
when yes, damm I don`t know any other functions with physX...




Last edited by Random; 09/01/10 16:52.


Re: physX explosion [Re: Random] #340173
09/01/10 17:01
09/01/10 17:01
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
look at this (from the manual):
Code:
pXent_addexplosion ( entity, VECTOR* vPos, var force, var radius);


maybe it will help you

otherwise, your code is strange!
Code:
if (event_type == EVENT_SCAN)
{
vec_set(ex_dir,you.x);
vec_set(temp_dir,my.x);
vec_sub(temp_dir,ex_dir);
vec_normalize(temp_dir,1000-result);
pXent_addvelcentral(me,temp_dir);
}



this should be in the EVENT functions of your entities and not in the loop which raises the ev!ent


Visit my site: www.masterq32.de

Moderated by  HeelX, Spirit 

Gamestudio download | 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