Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
whats wrong with this door script #122058
04/07/07 19:44
04/07/07 19:44
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
action rotating_door
{
my.skill1 = 1; //-1 = open, 1 = closed
my.skill2 = my.pan; //the pan angle for the closedposition of the door
my.skill3 = 0; //0 = door not moving, 1 = door is moving
my.skill4 = 0; //current angle offset the door is while it is moving
my.event_scan = ON;//turns on sensitivity to scans that hit it
my.event = scan_event;

while (me != NULL)
{
while(my.skill3)
{
if(my.skill4 >=90)
{
my.skill4 = 90;
my.skill1 = -1;
my.skill3 = 0;
}
else
{
if(my.skill4 <=0)
{
my.skill4 = 0;
my.skill1 = 1;
my.skill3 = 0;
}
}
my.pan = my.skill2 + my.skill4;
my.skill4 += my.skill1*2*time;
wait(1);
}
wait(1);
}
}

function scan_event
{
if(event_type == event_scan)
{
my.skill3 = 1;
}
}
when i run the level it gives me an error that reads:
<my.event_scan = ON>
PREVIEWB.WDL 62:0 error(50): parameter unkown 8 parameter

<my.event = scan_event>
PREVIEWB.WDL 63:0 error(63): parameter unkown scan_event

script error
Engine shutdown


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: whats wrong with this door script [Re: not_me] #122059
04/07/07 19:46
04/07/07 19:46
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
my.event_scan = on;
should be:
my.enable_scan = on;

my.event does not exist

Last edited by bstudio; 04/07/07 19:47.

BASIC programmers never die, they GOSUB and don't RETURN.
Re: whats wrong with this door script [Re: bstudio] #122060
04/07/07 19:50
04/07/07 19:50
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
should i change my.event = event_scan to my.enable = enable_scan?


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: whats wrong with this door script [Re: not_me] #122061
04/07/07 19:51
04/07/07 19:51
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
just remove:
my.event = scan_event;
my.event_scan = on;

and replace it with
my.enable_scan = on;

that should do the trick (at least for those errors)


BASIC programmers never die, they GOSUB and don't RETURN.
Re: whats wrong with this door script [Re: bstudio] #122062
04/07/07 21:27
04/07/07 21:27
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
ok


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: whats wrong with this door script [Re: not_me] #122063
04/07/07 21:41
04/07/07 21:41
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
You have to put the event function (scan_event) above the action of the door:
Code:

function scan_event
{
if(event_type == event_scan)
{
my.skill3 = 1;
}
}

action rotating_door
{
my.skill1 = 1; //-1 = open, 1 = closed
my.skill2 = my.pan; //the pan angle for the closedposition of the door
my.skill3 = 0; //0 = door not moving, 1 = door is moving
my.skill4 = 0; //current angle offset the door is while it is moving
my.enable_scan = ON;//turns on sensitivity to scans that hit it
my.event = scan_event;

while (me != NULL)
{
while(my.skill3)
{
if(my.skill4 >=90)
{
my.skill4 = 90;
my.skill1 = -1;
my.skill3 = 0;
}
else
{
if(my.skill4 <=0)
{
my.skill4 = 0;
my.skill1 = 1;
my.skill3 = 0;
}
}

my.pan = my.skill2 + my.skill4;
my.skill4 += my.skill1*2*time;
wait(1);
}

wait(1);
}
}




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