|
2 registered members (TipmyPip, Quad),
5,145
guests, and 4
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
C-Scrip To C-Lite... Meet many mistake ! Help !!??
#280743
07/24/09 02:02
07/24/09 02:02
|
Joined: Apr 2009
Posts: 39
TrQuocAn
OP
Newbie
|
OP
Newbie
Joined: Apr 2009
Posts: 39
|
Hi everyone ! I try to convert my scrip from C-Scrip to Lite-C but I met many Mistake , and I don't knoiw why  1. Do We have any perfect converter (I try BK Replace Em in 3DGS Manual) but it's not so good ! 2. See the picture below ! How to define a Skill... and use it?? What's the problem ???  3. if I had the code in C-Scrip:
function Set_Visible(on_off)
{
my.VISIBLE = on_off;
}
Conver to C-Lite :
function Set_Visible(on_off)
{
if (on_of==1) set(my,VISIBLE);
else reset(my,VISIBLE);
}
--> it make my code longer... do we have any way else ??? 4. I have the code :
ENTITY* testent = {
type = "some file...";
skill1 = 2;
skill2 = 3;
}
-> I meet the syntax error... How to uses Skill In Layer Model ??
Last edited by TrQuocAn; 07/24/09 02:42.
|
|
|
Re: C-Scrip To C-Lite... Meet many mistake ! Help !!??
[Re: TrQuocAn]
#280758
07/24/09 04:53
07/24/09 04:53
|
Joined: Aug 2003
Posts: 7,440 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,440
Red Dwarf
|
about #3: toggle(..) edit: sorry if i'm not more help, i'm just a c-script user.. don't know anything about lite-c 
Last edited by Michael_Schwarz; 07/24/09 04:53.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: C-Scrip To C-Lite... Meet many mistake ! Help !!??
[Re: Michael_Schwarz]
#280833
07/24/09 11:41
07/24/09 11:41
|
Joined: Apr 2009
Posts: 39
TrQuocAn
OP
Newbie
|
OP
Newbie
Joined: Apr 2009
Posts: 39
|
another one questtion : C-SCrip :
var angl[3];
....
angl.pan = 90;
angl.tilt = 180;
In C-Lite ... we can't uses pan and tilt for the var[3] and VECTOR... So do we have the Angle object ???
|
|
|
Re: C-Scrip To C-Lite... Meet many mistake ! Help !!??
[Re: TrQuocAn]
#281031
07/25/09 05:33
07/25/09 05:33
|
Joined: Apr 2009
Posts: 39
TrQuocAn
OP
Newbie
|
OP
Newbie
Joined: Apr 2009
Posts: 39
|
|
|
|
Re: C-Scrip To C-Lite... Meet many mistake ! Help !!??
[Re: TrQuocAn]
#281065
07/25/09 09:26
07/25/09 09:26
|
Joined: Sep 2003
Posts: 5,900 Bielefeld, Germany
Pappenheimer
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
|
another one questtion : C-SCrip :
var angl[3];
....
angl.pan = 90;
angl.tilt = 180;
In C-Lite ... we can't uses pan and tilt for the var[3] and VECTOR... So do we have the Angle object ??? I can't believe that this worked in c-script, because you define a var and use it later as a pointer! For using angl like angl.pan = 90; you have to define it as ENTITY* angl.
|
|
|
Re: C-Scrip To C-Lite... Meet many mistake ! Help !!??
[Re: Pappenheimer]
#281085
07/25/09 12:57
07/25/09 12:57
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
you can use
VECTOR vec_name; //then use vec_name.x, vec_name.y and vec_name.z
otherwise use ANGLE ang_name; //then use ang_name.pan, ang_name.tilt and ang_name.roll
for skills you'll see in compat.h so for definig your own skills either decide if you're using the array skill[0] or skill1 just for simplicity (even though they're both the same things
#define HEALTH skill1; //same as #define HEALTH skill[0]
//then later in your project maybe an action?
action act_bobo(){
my.HEALTH = 100;
//same as my.skill1 = 100;
//same as my.skill[0] = 100;
for flags my.VISIBLE
now you need
set(my, VISIBLE); //which is defined in acknex.h, to set panels visible
//though ENTITIES use reset(my, INVISIBLE);
you can also use toggle as Michael says, which will automatically toggle a flag and to then check if something is visible use
if(is(my, VISIBLE)){ //work you magic
in layer models, you'll need to place the .x ahead of the camera
ENTITY* shotgun_onscreen =
{
type = "shotgun.mdl";
layer = 2; // display above view entities with layer 1
flags2 = SHOW; // lite-C only: visible on screen from the start x = 100; // place 100 quants ahead of the view
y = -50; // 50 to the right
z = 0; // and center vertically
}
hope this helps
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|