Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, USER0328), 6,640 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to throw ball if only touching one side? #66122
03/11/06 23:28
03/11/06 23:28
Joined: Nov 2005
Posts: 49
Massachusetts
T
TBone Offline OP
Newbie
TBone  Offline OP
Newbie
T

Joined: Nov 2005
Posts: 49
Massachusetts
Hi

I am using event_impact to trigger an ent_animate() and I would like to know how to add that the model can only be impacted by one side for it to work.

I tried Vec_set_vertices() but that didn't seem to work.

any suggestions

the model is a ball and I would like so that the animate trigger only worked when the other model made the impact with one side.

Thanks


"Supreme executive power derives from a mandate of the masses NOT some farcicle aquatic ceromony" Constitutional peasant skit "Monty Python and the Holy Grail"
Re: how to throw ball if only touching one side? [Re: TBone] #66123
03/14/06 16:26
03/14/06 16:26
Joined: Aug 2005
Posts: 199
houston
S
seneca Offline
Member
seneca  Offline
Member
S

Joined: Aug 2005
Posts: 199
houston
Well, i would suggest making a small invisible box on the side of the ball you want the reaction to happen. putting the box close enough to seem that the player is touching the ball. then, you can have the action triggered by the box effect the ball.

maybe this will work for you?


a8 commercial
Re: how to throw ball if only touching one side? [Re: TBone] #66124
03/14/06 20:40
03/14/06 20:40
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Try to use the "normal" vector:

From the manual (look at event_impact)
Quote:

Normal and bounce are also set to give the direction perpendicular to the moving surface and the direction into which the entity would bounce.





no science involved
Re: how to throw ball if only touching one side? [Re: seneca] #66125
03/15/06 12:43
03/15/06 12:43
Joined: Nov 2005
Posts: 49
Massachusetts
T
TBone Offline OP
Newbie
TBone  Offline OP
Newbie
T

Joined: Nov 2005
Posts: 49
Massachusetts
Thanks, I'll try that and let you know


"Supreme executive power derives from a mandate of the masses NOT some farcicle aquatic ceromony" Constitutional peasant skit "Monty Python and the Holy Grail"
Re: how to throw ball if only touching one side? [Re: TBone] #66126
03/28/06 06:23
03/28/06 06:23
Joined: Nov 2005
Posts: 49
Massachusetts
T
TBone Offline OP
Newbie
TBone  Offline OP
Newbie
T

Joined: Nov 2005
Posts: 49
Massachusetts
Hi,
I'm obviously missing a link from the trigger module to the ball module. Once the "impact" occurs I call the ball travel() and then that verifies impact with Code:
 if (event_type==event_impact) { etc. 



any ideas of what's missing or how to fix it?

here is the code:
Code:


//attached to the ball.mdl

action Ball_path
{
var counter =0;//used to count path pspn;


if( (event_type == event_impact) && (mouse_left==1) )
{
counter = 0;
temp.pan = 360;
temp.tilt = 180;
temp.z = 1000;
result = scan_path (my.x, temp);

if (result == 0)
{
return;
}

ent_waypoint(my._TARGET_X,1);

while (counter<24)
{
temp.x = my._TARGET_X - my.x;
temp.y = 0;
temp.z = my._TARGET_Z - my.z;
result = vec_to_angle(my_angle,temp);

if (result < 23)
{
ent_nextpoint (my._TARGET_X);
counter+=1;
}
c_move(my, vector(temp.x,0,temp.z), nullvector,ignore_passable);

wait(1);
}
score_basket();
}
}


//attaced to the invisible cude
action Trigger_Ball_path
{
my.enable_impact=on;
my.event= ball_Path;
}




"Supreme executive power derives from a mandate of the masses NOT some farcicle aquatic ceromony" Constitutional peasant skit "Monty Python and the Holy Grail"

Moderated by  HeelX, rvL_eXile 

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