Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
same script different action ?? #328764
06/15/10 05:08
06/15/10 05:08
Joined: Dec 2006
Posts: 55
Sweden
overseer Offline OP
Junior Member
overseer  Offline OP
Junior Member

Joined: Dec 2006
Posts: 55
Sweden
hi i got a door action script that is a modified version of one i found in aum.
i set it to ignore Flag2 so that i would work and not colide with clip maps and meshes.
used it and worked great in level 1,2 and 5 but the same script in level 3 and 4 only plays the sound of the door opening no motion at all.

ps: worked on all level before the update.

this happend after recompiling the levels with the may update of the engine.

any ideas...the script works since it works on 1,2,5 on levels 3 and 4 i checked every mesh and clip map and they are all set to flag2.

Last edited by overseer; 06/15/10 05:10.

Lets finish this mother¤%"#%& of.
Re: same script different action ?? [Re: overseer] #328821
06/15/10 15:11
06/15/10 15:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Sorry, I can't see from here what's different with your doors in your levels 3 and 4. But something obviously is.

Re: same script different action ?? [Re: jcl] #328824
06/15/10 15:19
06/15/10 15:19
Joined: Dec 2006
Posts: 55
Sweden
overseer Offline OP
Junior Member
overseer  Offline OP
Junior Member

Joined: Dec 2006
Posts: 55
Sweden
well it worked until yesterday on all the levels then i was stupid and updated to the latest version of 3dgs and it screwed my doors in level 3 and 4 same script and same levels no change other that i compiled them with the new version..

here is the code.

// door open close action //

var clockwise = 1; // the door will rotate clockwise, set it to 0 if you need a conter-clockwise rotation



SOUND* dooropens_wav = "door1_sfx.wav";



action my_door()

{

var init_pan;

init_pan = my.pan;

while (!player) {wait (1);} // make sure to add the "player = my;" line of code to your player action

while (1)

{

// this section opens the door

while (vec_dist (player.x, my.x) > 250) {wait (1);} // play with 100

snd_play (dooropens_wav, 100, 0);

if (clockwise) // the door is supposed to rotate clockwise?

{

while (my.pan > init_pan - 90)

{

c_rotate (me, vector(-4 * time_step, 0, 0), IGNORE_FLAG2);

wait (1);

}

}

else // default = rotate counter-clockwise

{

while (my.pan < init_pan + 90)

{

c_rotate (me, vector(4 * time_step, 0, 0), IGNORE_FLAG2);

wait (1);

}

}

// this section closes the door

while (vec_dist (player.x, my.x) < 400) {wait (1);} // wait until the player moves away, play with 300

snd_play (dooropens_wav, 100, 0);

if (clockwise) // the door is supposed to rotate clockwise?

{

while (my.pan < init_pan)

{

c_rotate (me, vector(4 * time_step, 0, 0), IGNORE_FLAG2);

wait (1);

}

}

else // default = rotate counter-clockwise

{

while (my.pan > init_pan)

{

c_rotate (me, vector(-4 * time_step, 0, 0), IGNORE_FLAG2);
wait (1);

}

}

wait (1);

}

}


Lets finish this mother¤%"#%& of.
Re: same script different action ?? [Re: overseer] #329094
06/17/10 14:14
06/17/10 14:14
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I can not see the reason of the problem from your script.

I suggest that you post this question in the beginners forum. Other users will help you examine your levels and find the difference. The developers forum is only meant as a last resort, for advanced questions that can't be answered in any other forum section.


Moderated by  old_bill, Tobias 

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