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
2 registered members (AndrewAMD, TipmyPip), 12,420 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
Page 2 of 2 1 2
Re: [newton] collision prob? [Re: Efrint] #50236
07/28/05 06:59
07/28/05 06:59
Joined: Aug 2004
Posts: 593
Germany
Efrint Offline OP
Developer
Efrint  Offline OP
Developer

Joined: Aug 2004
Posts: 593
Germany
nobody knows how to create the .cls file?

here is my main-code. What do i have to change to create the .cls file?

Code:
 define _mass,SKILL1; 
define _lineardrag,skill2;
define _angulardragx,skill3;
define _angulardragy,skill4;
define _angulardragz,skill5;
define _shapefactor,skill6;
define _material,skill7;
define _waterentity,skill8;

define _collisionshape,flag1;
define _autorest,flag2;
define _startactive,flag3;

function* p_phevent;
entity* p_tempent1;
entity* p_tempent2;

sound snd_click=<click.wav>;
sound snd_poolball=<poolball.wav>;
sound door_op=<door_op.wav>;

var ground_material;
var wood_material;
var ivory_material;
var water_material;

define newtonGravity,-700.0;

define MAX_VALUE,1048576.0;

define SOUND_IMPACT_DELAY,8;
define MIN_IMPACT_SPEED,25;

var maxCollisionSpeed;
////Newtonifdef////
string level_str=<training_L1.wmb>;
ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <main.CLS>; endif;

////////////////////
bmap splashmap = <logo_A6.pcx>; // the default logo in templates
bmap logos=<logo.pcx>;
//bmap logo2=<logo2.pcx>;
panel splashscreen {
bmap = splashmap;
flags = refresh,d3d;
}
panel logo1 {
bmap=logos;
flags=refresh,d3d;
}
//panel splashscreen2 {
// bmap = logo2;
// flags = refresh,d3d;
//}




////MAIN//////
var video_mode = 8; // screen size 1024x768
var video_depth = 16; // 16 bit colour D3D mode


function main()
{
freeze_mode=1;
fps_min=60;
fps_max=60;
var nexus=128;
max_entities = 1000;
warn_level = 2;
mouse_mode = 0;

ifdef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
NewtonAddMap (level_str, splashscreen);
endif;

wait(3);
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
splashscreen.visible = on;
wait(3);
sleep(1);
splashscreen.visible = off;

logo1.pos_x = (screen_size.x - bmap_width(splashmap))/2;
logo1.pos_y = (screen_size.y - bmap_height(splashmap))/2;
logo1.visible = on;
wait(3);
sleep(1);
logo1.visible=off;

freeze_mode=0;
level_load(level_str);



}



Regards Efrint

here is a picture. You can see the ball falling through a level-block:



Last edited by Efrint; 07/28/05 11:15.
Re: [newton] collision prob? [Re: Efrint] #50237
07/28/05 13:12
07/28/05 13:12
Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Marcio Esper Offline
Senior Member
Marcio Esper  Offline
Senior Member

Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
To create this cls, you just need to save the level before compile it

Just is it

best regards,

Marcio

NOTE: Your cls will have the same name of your level.

Re: [newton] collision prob? [Re: Marcio Esper] #50238
07/28/05 13:14
07/28/05 13:14
Joined: Aug 2004
Posts: 593
Germany
Efrint Offline OP
Developer
Efrint  Offline OP
Developer

Joined: Aug 2004
Posts: 593
Germany
no...that doesn´t work.....

i clicked at save...then on build and then on run...but there is no cls-data....

Re: [newton] collision prob? [Re: Efrint] #50239
07/28/05 13:22
07/28/05 13:22
Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Marcio Esper Offline
Senior Member
Marcio Esper  Offline
Senior Member

Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
you need NewtonAddMap in your main and set the name to s_level in the case of this ex. not splashscreen.

The splashscreen is the A6 panel



Code:


string s_level=<main.wmb>;
string s_levelcls=<main.cls>;
string newtonLevel_cls=s_levelcls;

// this is the same name of your map in this ex main.CLS if you save your mapa named main.wmp


function main(){

//........
level_load(s_level);
wait(1);

dll_handle=newtonHandle;
NewtonAddMap(s_levelcls,0);




I hope it help you

best regards,

Marcio

Re: [newton] collision prob? [Re: Marcio Esper] #50240
07/28/05 14:59
07/28/05 14:59
Joined: Aug 2004
Posts: 593
Germany
Efrint Offline OP
Developer
Efrint  Offline OP
Developer

Joined: Aug 2004
Posts: 593
Germany
thx...that wasn´t the solution, but you made me think, that i should put the includes before the main function...and it works now.....thx for your help!

Re: [newton] collision prob? [Re: Efrint] #50241
07/28/05 18:52
07/28/05 18:52
Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Marcio Esper Offline
Senior Member
Marcio Esper  Offline
Senior Member

Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Hi,

No problem

best regards,

Marcio

Page 2 of 2 1 2

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