Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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 | 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