Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,512 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Could someone create this for me? #370811
05/15/11 23:17
05/15/11 23:17
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
Well my time with Litec has been weird, I started learning and made a simple game but then stopped and forgot, I came back and I couldnt fix a problem so stopped again but now I would really like to continue and get back into coding. But I have gone through the tutorials and I am still having problems like before. Could someone create for me a simple script that loads a map, skylayer and a charactermodel that can be moved by WSAD and a camera that follows him from behind. I can modify the rest but no matter what I put even when I read back through my previous topics the character doesnt spawn and when he does the skylayer and map dont.

Thanks to anyone who takes the time!

edit: here is the fault log for a new project I just tried to make quickly:
Code:
< PANEL* pSplash = {>
VERTICALLEAP_MAIN.WDL 12:0  (): Parameter unknown PANEL*  bad keyword in { } 

< bmap = "logo.jpg";>
VERTICALLEAP_MAIN.WDL 12:0  (): Parameter unknown bmap  bad keyword in { } 

< video_mode=7>
VERTICALLEAP_MAIN.WDL 21:0  (): Read only video_mode   

< set(pSplash,VISIBLE)>
VERTICALLEAP_MAIN.WDL 26:0  (): Parameter unknown pSplash   

< pan_remove(pSplash)>
VERTICALLEAP_MAIN.WDL 43:0  (): Parameter unknown pSplash   

< set(tHelp,VISIBLE)>
VERTICALLEAP_MAIN.WDL 44:0  (): Parameter unknown tHelp   

< ent_createlayer(@2,SKY|CUBE|VISIBLE,0)>
VERTICALLEAP_MAIN.WDL 47:0  (): Parameter unknown SKY



edit2: okay I found out that because I had an underscore in the script it wasnt compiling properly now I have fixed that and called it main.c my only problem is when I start it the game loads and as soon as the window pops up it makes a "bing" sound then closes I see a 1 second glimpse of a black screen.

Last edited by JakeBilbe; 05/15/11 23:45.
Re: Could someone create this for me? [Re: JakeBilbe] #370815
05/15/11 23:46
05/15/11 23:46
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
you'll definately prefer to do it by yourself when it's done and be glad you got there.

have you included your headers at the top of your script
Code:
#include <acknex.h>
#include <default.c>

?

Re: Could someone create this for me? [Re: MrGuest] #370817
05/15/11 23:55
05/15/11 23:55
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
Well now I fixed that problem I am starting to get further than before thank god lol, I fixed it by putting

Code:
ent_create("character.mdl", vector(25,55,45), main_player);



at the end of the main function. Right now the map, character and skylayer loads fine but it keeps saying "Empty pointer in main", if I click okay it just pops back up.

Last edited by JakeBilbe; 05/15/11 23:58.
Re: Could someone create this for me? [Re: JakeBilbe] #370819
05/16/11 00:10
05/16/11 00:10
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
post the code for main


Our new web site:Westmarch Studios
Re: Could someone create this for me? [Re: Gordon] #370820
05/16/11 00:13
05/16/11 00:13
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
here

Code:
function main()
{
        video_mode = 7;
	shadow_stencil = 1;
	sound_vol = 100;
	set(pSplash,VISIBLE);
	wait(3);
	level_load("farm.hmp");
	ent_createlayer("skylayer.tga", SKY | CUBE | VISIBLE, 0);
	wait(-1); 
	pan_remove(pSplash); 
	ent_create("character.mdl", vector(25,55,45), main_player);
}



ignore that after testing something it seems to be this code that gives the error

Code:
action main_player() //control the player
{    
  var walk_percentage = 0;
  while (1) 
  {
    my.pan += (key_a - key_d)*5*time_step;   //rotate the entity using [A],[D]
    var distance = (key_w - key_s)*5*time_step;
    c_move(me, vector(distance,0,0), NULL, GLIDE); //move it using [W],[S]
    walk_percentage += distance;
    ent_animate(me, "walk", walk_percentage, ANM_CYCLE); //animate the entity
    wait (1);
  }
}



edit3: found the problem its to do with this
Code:
c_move(me, vector(distance,0,0), NULL, GLIDE);



Last edited by JakeBilbe; 05/16/11 00:35.
Re: Could someone create this for me? [Re: JakeBilbe] #370829
05/16/11 01:01
05/16/11 01:01
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
there's nothing really wrong with that line, can you post everything you have,

also try just creating you character without any actions see if it's definately inside main_player as it's doesn't appear wrong other than needing a bit of optimising.
Code:
ent_create("character.mdl", vector(25, 55, 45), NULL):



Re: Could someone create this for me? [Re: MrGuest] #370831
05/16/11 01:28
05/16/11 01:28
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
I fixed it, after comparing code I had before to the code I wrote up today I managed to fix some bits, although I cant seem to animate it because of the way I have made him move. Could someone clean this code up for me a little bit and make him use the animations run, stand and jump on space and also make it so that he stands on the map and not go through it?

Code:
action main_player() //control the player
{
while (1) //wait 1
{
if (key_a)
my.pan += 19*time_step; //if key A is pressed turn left
if (key_d)
my.pan -= 19*time_step;//if key D is pressed turn right
if (key_w)
c_move (my, vector(12 * time_step, 0, 0), nullvector, GLIDE); //if key W is pressed go forward
         
if (key_space) me.z +=8; //if space is pressed jump
if (me.z > 20) me.z -=0.4; //if the player is above z.20 then glide down at 0.4 speed
wait (1);

		camera.x = my.x+100; // camera location behind the player
      camera.y = my.y;    // camera left/right placement
      camera.z = my.z+50; // camera height
      camera.tilt = -25;  // make it look downwards
      wait (1);
}
}



Re: Could someone create this for me? [Re: JakeBilbe] #370837
05/16/11 05:54
05/16/11 05:54
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
deleted.

Last edited by Quadraxas; 05/16/11 05:55.

3333333333

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