Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, 7th_zorro, dr_panther), 1,297 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 4 1 2 3 4
Re: Aum63 [Re: George] #120406
05/03/07 22:07
05/03/07 22:07
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline
Member
Dragon6261  Offline
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
will do!! Actually i already have two prelim screenshots at my website

http://dragonlairme.tripod.com/

just follow the golf links(no pun intended)
IT SHOULD BE NOTED THAT THIS WEBSITE IS INTENDED FOR MATURE USERS!!!!

Last edited by Dragon6261; 05/03/07 22:29.

Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: Aum63 [Re: Dragon6261] #120407
05/05/07 15:12
05/05/07 15:12
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline
Member
Dragon6261  Offline
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
Ok George (or anybody) now i need some help
function kick_ball() // moves the ball when the player presses the left mouse button
{
if (club.invisible) {return;} // don't hit the ball if the club is invisible
while ((joy_3) && (shot_time.x < 1000)) // wait until the player releases the mouse button or the shot power has reached its max was mouse_left
{
shot_time.x += 50 * time_step; // increase the power of the shot
club.tilt = -shot_time.x / 20; // and tilt the club backwards accordingly
wait (1);
}
while (joy_3) // wait until the player releases the left mouse button
{
if (shot_time.x >= 1000) // a max power shot is on its way?
{
club.tilt = -shot_time.x / 20; // then keep the club in its proper position!
}
wait (1);
}
number_of_shots += 1; // increase the number of shots
shot_time.y = 0;
shot_time.z = 0;
vec_rotate (shot_time, club.pan); // rotate shot_time in the direction pointer by the club
phent_addvelcentral (ball, shot_time); // and add a linear velocity to the ball
snd_play (ball_wav, 100, 0); // play the ball impact sound
shot_time = 0; // and then reset the shot power
}
}


//function hit_ball()
//{
// while(1)
// {
// if (joy_3 == on)
// {
// kick_ball();
// }
// }
//}//


on_mouse_left = kick_ball; // press the left mouse button to strike the ball//

using the above code i can now use joystick(gamepad) button 3 to kick ball but only if mouse left is also clicked. I tried to use function hit ball so that only the joystick or gamepad was used but it won't work. What am i missing? I understand if this is moved to another area as i'm not sure it should be posted here. Thank you in advance for any help!!


Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: Aum63 [Re: Dragon6261] #120408
05/05/07 19:41
05/05/07 19:41
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
You are using "on_mouse_left" to trigger the function - that's the problem.

Re: Aum63 [Re: George] #120409
05/05/07 22:16
05/05/07 22:16
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline
Member
Dragon6261  Offline
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
currently yes, but i tried to use the function hit_ball that you see in comments and it wouldn't work. I also tried on_joy3 but it spit back a error.
iI have been able to spin my character and club using the gamepad using joyforce code and if i push the left mouse button my #3 button on my gamepad will do the rest but i can't figure the code so that the #3 button will do everything.
i also tried
if(joy3 == on)
{
kick_ball;
}
but that also kicked back a error


Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: Aum63 [Re: Dragon6261] #120410
05/06/07 14:00
05/06/07 14:00
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Triggering function kick_ball that way will make several copies of it run at the same time. On_mouse_left runs the function only once.

Re: Aum63 [Re: George] #120411
05/06/07 16:29
05/06/07 16:29
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline
Member
Dragon6261  Offline
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
Ok I got it to work, it was a typo. I should really learn to use spellcheck. Thanks for your help.


Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: Aum63 [Re: George] #120412
05/10/07 15:25
05/10/07 15:25
Joined: Jul 2003
Posts: 85
France
Gandalf Offline
Junior Member
Gandalf  Offline
Junior Member

Joined: Jul 2003
Posts: 85
France
About phent_settype (ball, 0, PH_SPHERE); // disable the physics for this ball for a bit

When you register the physics entity again
phent_settype (ball, PH_RIGID, PH_SPHERE;

You must add again
Code:
 
phent_setmass (ball, 2, PH_SPHERE); // and its mass
phent_setfriction (ball, 60); // set the friction
phent_setdamping (ball, 25, 30); // set the damping
phent_setelasticity (ball, 85, 90); // set the elasticity


Because you lost this datas when you disable the physics

Re: Aum63 [Re: Gandalf] #120413
05/10/07 20:01
05/10/07 20:01
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline
Member
Dragon6261  Offline
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
Yep that's what i did, it was really noticable when or if you restarted a hole. i'm up to five complete holes now in my game based on this code.


Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: Aum63 [Re: Dragon6261] #120414
05/10/07 20:27
05/10/07 20:27
Joined: Jul 2003
Posts: 85
France
Gandalf Offline
Junior Member
Gandalf  Offline
Junior Member

Joined: Jul 2003
Posts: 85
France
I can't work with minigolf in this moment. Y must finish my Pushbox and many littles games for my pack games.

dumb question!!! [Re: George] #120415
05/28/07 07:47
05/28/07 07:47
Joined: May 2005
Posts: 138
jamrud khatulistiwa
Kotakide Offline
Member
Kotakide  Offline
Member

Joined: May 2005
Posts: 138
jamrud khatulistiwa
Hi George, I have one dumb question about Minigolf on Aum63.
How to add shadow to the ball? and the club?
please....

As always your magazine is very amazing!!!!

Page 3 of 4 1 2 3 4

Moderated by  George 

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