3 registered members (AndrewAMD, VoroneTZ, 1 invisible),
1,512
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Could someone create this for me?
#370811
05/15/11 23:17
05/15/11 23:17
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
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:
< 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
MrGuest
Serious User
|
Serious User
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
#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
JakeBilbe
OP
Junior Member
|
OP
Junior Member
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
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: Gordon]
#370820
05/16/11 00:13
05/16/11 00:13
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
here
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
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
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
MrGuest
Serious User
|
Serious User
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.
ent_create("character.mdl", vector(25, 55, 45), NULL):
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|