Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
schoolproject ballgame problem #286780
08/27/09 11:11
08/27/09 11:11
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
Wenn I start it, it shows up an warning;
"empty pointer in main"
Then the energy shuts down.

Were is here the problem?!!


///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////
SOUND* bump = "tap.wav";
var bump_handle;
///////////////////////////////////////////////////////////////
function Plop();
///////////////////////////////////////////////////////////////
PANEL* pSplash = { bmap = "logo_800.jpg"; }

VECTOR ball_force;
ENTITY* ball;
ENTITY* stone;

function main()
{
shadow_stencil = 1;

level_load("extrem1.wmb");
ball = ent_create ("ball.mdl", vector(-76, -7, 135), NULL);
set(ball,SHADOW);
ph_setgravity (vector(0, 0, -386));
phent_settype (ball, PH_RIGID, PH_SPHERE);
phent_setmass (ball, 10, PH_SPHERE);
phent_setfriction (ball, 99);
phent_setdamping (ball, 40, 40);
phent_setelasticity (ball, 10, 20);
while (1)
{
ball_force.x = 380 * time_step * (key_d - key_a);
ball_force.y = 380 * time_step * (key_w - key_s);
ball_force.z = 0;
phent_addtorqueglobal (ball, ball_force);
camera.x = ball.x - 29;
camera.y = ball.y;
camera.z = 30;
camera.tilt = -5;
wait (1);
}
}

action bigstone()
{
set(my,SHADOW);
ph_setgravity (vector(0, 0, -386));
phent_settype (stone, PH_RIGID, PH_BOX);
phent_setmass (stone, 1, PH_BOX);
phent_setfriction (stone, 99);
phent_setdamping (stone, 40, 40);
phent_setelasticity (stone, 10, 20);
stone.event = hit;
stone.emask |= ENABLE_FRICTION;
}

function hit()
{
sbump mad _handle = ent_playloop(my,bump,100);
}


I have know Gamestudio/A7 Commercial Edition 7.84
Re: schoolproject ballgame problem [Re: Blackchuck] #286793
08/27/09 13:13
08/27/09 13:13
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You need to add at least a "stone = me;" in the beginning of the action bigstone.

Last edited by Pappenheimer; 08/27/09 13:13.
Re: schoolproject ballgame problem [Re: Pappenheimer] #286818
08/27/09 14:50
08/27/09 14:50
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
jay!!!
cool it works, thank you man!!!


I have know Gamestudio/A7 Commercial Edition 7.84

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