Engine = problem with scans?

Posted By: Seriff

Engine = problem with scans? - 12/13/05 14:40

Hi, i bought A6.22 some time ago. And now there's the A6.31 version...
I tried to install it but i don't like to work with it... i dont know why i prefer the 6.22.
Whats the diference between them?
I have a scan script with events that doesnt work, and some shaders too... Its cuz of the A6.22?
Posted By: HIAS

Re: A6.22 and A6.31 - 12/13/05 16:57

The complete future list can be found here
but the main future is that A6.31 now runs under directx 9.0c
Posted By: Seriff

Re: A6.22 and A6.31 - 12/13/05 19:18

So why does this script doesnt work?
Its suposed that the player jumps when it touches the jump spring, but, nothing happens, and no error messages are given...



action roller
{
PLAYER=me;
player.enable_scan = on;// this makes sure the player can be scanned by
[Walking script...]
}



function jumpspringfunc
{player.enable_scan = on;// this makes sure the player can be scanned by othersmy.blue = 255;

if ((EVENT_TYPE == EVENT_ENTITY)&&(YOU == PLAYER))
{
result = vec_dist(my.x,player.x);

if(result <= 1)
{
phent_addcentralforce(PLAYER,vector(my.skill1*COS(my.pan),my.skill1*SIN(my.pan),my.skill1*TAN(my.tilt)))*time;
}
}
}


action mola
{
my.event = jumpspringfunc;
temp.x = 120;
temp.y = 120;
temp.z = 300;
scan_entity(my.x,temp);
}
Posted By: Anonymous

Re: A6.22 and A6.31 - 12/13/05 19:25

You need to put the () next to the name of the function. Plus, any code you put in next to the // will be ignored by the compiler.
Posted By: Seriff

Re: A6.22 and A6.31 - 12/13/05 19:45


action roller
{
PLAYER=me;
player.enable_scan = on;// this makes sure the player can be scanned by
[Walking script...]
}



function jumpspringfunc()
{player.enable_scan = on;

if ((EVENT_TYPE == EVENT_ENTITY)&&(YOU == PLAYER))
{
result = vec_dist(my.x,player.x);

if(result <= 1)
{
phent_addcentralforce(PLAYER,vector(my.skill1*COS(my.pan),my.skill1*SIN(my.pan),my.skill1*TAN(my.tilt)))*time;
}
}
}


action mola
{
my.event = jumpspringfunc;
temp.x = 120;
temp.y = 120;
temp.z = 300;
scan_entity(my.x,temp);
}


Ok, now its like this, but the same problem exists :S
Posted By: ulillillia

Re: A6.22 and A6.31 - 12/14/05 00:26

Quote:


action roller
{
PLAYER=me;
player.enable_scan = on;// this makes sure the player can be scanned by
[Walking script...]
}



function jumpspringfunc()
{player.enable_scan = on;

if ((EVENT_TYPE == EVENT_ENTITY)&&(YOU == PLAYER))
{
result = vec_dist(my.x,player.x);

if(result <= 1)
{
phent_addcentralforce(PLAYER,vector(my.skill1*COS(my.pan),my.skill1*SIN(my.pan),my.skill1*TAN(my.tilt)))*time;
}
}
}


action mola
{
my.event = jumpspringfunc();
temp.x = 120;
temp.y = 120;
temp.z = 300;
scan_entity(my.x,temp);
}


Ok, now its like this, but the same problem exists :S




Your mistake is in the function call at the top of your action (marked in red-orange). You need the () in there.
Posted By: Seriff

Re: A6.22 and A6.31 - 12/14/05 15:10

LOL.
Seneca told me exactly the oposite, "never put the () there".
I tried the both ways, but it doesnt work...nothing is happening :S
Posted By: Grimber

Re: A6.22 and A6.31 - 12/14/05 15:51

you have 2 actions there but niether is set up right for event handling

one has an my.enable_ but no my.event =

the other action has a my.event= but no events enabled
the player.enable_scan = onl in the fucntion is redundant as you already have it set in the action where you assign the player pointer in the first place

and no, you do not use () at the end of the my.event = function definition.

so how do you expect it to work?

it's not your edition, it's your scripting
Posted By: FoxHound

Re: A6.22 and A6.31 - 12/14/05 16:34

When you call a function you have to have (), but when you make a function you don not, in fact unless you use paramaters then you shouldn't use them.

fox_func();

function fox_func
{
foxhound.cool = on;
Posted By: Seriff

Re: A6.22 and A6.31 - 12/19/05 23:04

Thanks
© 2024 lite-C Forums