Gamestudio Links
Zorro Links
Newest Posts
No connection to MT4
by JeyKey II. 11/22/26 10:49
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, Martin_HH, EW_bytes), 41,857 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help with collision event script. #208359
05/26/08 21:14
05/26/08 21:14
Joined: Apr 2008
Posts: 10
C
Chavias Offline OP
Newbie
Chavias  Offline OP
Newbie
C

Joined: Apr 2008
Posts: 10
Hi,
The concept is this: I am working on a script that, when the player comes into contact with a certain object, that object is deleted and one point is added to the score.
I have a script so far, that runs fine, but when the player comes into contact with the object, it isnt removed, and is still quite clearly visible. When I run the application, and press F11 twice, I can see that the 'boxes' touch, but the models/objects do not.

Please find below, the script so far:

Code:
function killAndScore(){ 
    my.event = NULL;
    set(my,PASSABLE|INVISIBLE);
    score++;
    wait(1);
    ent_remove(me);
} 

action applyToObject(){ 
    my.emask |= EVENT_IMPACT;
    my.event = killAndScore;
    
} 


If you have any ideas, improvements, suggestions of better working code, it would be greatly appreciated.
PS: I think this has something to do with the Hull (f/n?) Can someone please shed some light on this, thanks.

Re: Help with collision event script. [Re: Chavias] #208477
05/27/08 16:35
05/27/08 16:35
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline
Senior Member
Vadim647  Offline
Senior Member
V

Joined: Feb 2008
Posts: 337
1.
Code:
action score_me()
{
set(my,PASSABLE);
while (vec_dist(player.x,my.x)>32) {wait(1);}
score++;
ent_remove(me);
}

Or in my '3d pacman game' (direct link)
2. This topics doesn't realy belong to contributions.


I switched to other account since marth 2010. Guess which.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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