`Hi
Sometimes the below script (rain/snow plugin) errors giving the Wait command as the error...
Sometimes it does not error at all and carry's on as it should..
This must surely be a bug somehow else it would either run all the time or error all the time..
ShakeScreenBackground (4, 10, 80);
Wait(1);
srSetSnowDriftRange(20, 80);
srSetSnowDriftSpeed(20, 80);
srSetSnowFallSpeed(50, 200);
srChangeSnowAmount(50);
srSetSnowBaseline(100, 200);
srSetSnowTransparency(4, 50);
srSetSnowView(0, 0, 51, 0);
srSetSnowView(1, 0, 73, 0);
Wait(100);
srSetSnowView(0, 0, 51, 0);
srSetSnowAmount(0);
Display("The chunks of frozen ice miss you by inches!");
Scratching my head..
barefoot
What is the exact error message?
Also, does the game always work if that Wait() line is commented?
Hi
i am not on my pc will look in laters
cheers
barefoot
Hi
I // commented the Wait but it still errors now and then...not so much, but it has to be dealt with.. maybe i am in the wrong somehow?
If you dont' have a Wait then the effect does NOT happen.. I need it to happen for about 2 / 3 seconds.
my code is this:
ShakeScreenBackground (4, 10, 80);
Wait(1);
srSetSnowDriftRange(20, 180);
srSetSnowDriftSpeed(20, 180);
srSetSnowFallSpeed(50, 200);
srChangeSnowAmount(50);
srSetSnowBaseline(100, 200);
srSetSnowTransparency(4, 50);
srSetSnowView(0, 0, 51, 0);
srSetSnowView(1, 0, 73, 0);
//Wait(100);
srSetSnowView(0, 0, 51, 0);
srSetSnowAmount(0);
Display("Again the chunks of frozen ice miss you by inches!");
ERROR:
(http://www.brooklandscarco.co.uk/snow-error2.png)
Have just // the next Wait... I will check again... cheers
barefoot
It would probably be helpful to tell us what the error is.
Quote from: monkey_05_06 on Sun 13/03/2011 18:12:06
It would probably be helpful to tell us what the error is.
Error screen above..
It takes effect after FadeIn and after a few Says... and its supposed to happen every time you step on a region..
Here is script after FadeIn and with second Wait(40)
Also what do I do about crash dmp file?
oakozos.SetView(72, 0, 0);
oakozos.Animate(0, 3, eRepeat, eNoBlock);
cEgo.SayAt(95, 300, 250, "Who are thee that approach my domain!!!!");
oakozos.SetView(72, 0, 0);
cwizard.Say("I am Magrid. Wizard to the King.");
oakozos.SetView(72, 0, 0);
oakozos.Animate(0, 3, eRepeat, eNoBlock);
cEgo.SayAt(95, 300, 250, "You are forbidden here. Go!!!!");
oakozos.SetView(72, 0, 0);
cwizard.Say("Tis your prism I seek!");
oakozos.SetView(72, 0, 0);
oakozos.Animate(0, 3, eRepeat, eNoBlock);
cEgo.SayAt(95, 300, 250, "The prism has been entrusted to me. Prepare to meet your doom with my chunks of frozen ice!!!!");
oakozos.SetView(72, 0, 0);
ShakeScreenBackground (4, 10, 80);
Wait(1);
srSetSnowDriftRange(20, 80);
srSetSnowDriftSpeed(20, 80);
srSetSnowFallSpeed(50, 200);
srChangeSnowAmount(50);
srSetSnowBaseline(100, 200);
srSetSnowTransparency(4, 50);
srSetSnowView(0, 0, 51, 0);
srSetSnowView(1, 0, 73, 0);
Wait(40);
srSetSnowView(0, 0, 51, 0);
srSetSnowAmount(0);
Display("The chunks of frozen ice miss you by inches!");
barefoot
Well seeing as you edited your post and placed that pic two minutes after I posted..:P
What line is line 36? If you've commented out the Wait, then where specifically is the error arising?
Quote from: monkey_05_06 on Sun 13/03/2011 21:12:33
Well seeing as you edited your post and placed that pic two minutes after I posted..:P
What line is line 36? If you've commented out the Wait, then where specifically is the error arising?
Hi Monkey
The error occurs in Room 25 Line 36 which is Wait(40);
// out the line usually runs ok but generally shows no flakes so it seems it needs a Wait() to perform snow scene which i want to show large chunks of ice (view 72) for a couple of seconds instead of the default small flakes (view 51)..
The whole point of raising this issue was that it does work sometimes..
I am playing around with script to try and get it to perform as it should..
cheers
barefoot
I pasted your codes into a quick default game and it worked fine without (much) modification (I only changed the Views to the default roger view). You put these codes in the Region_WalkOnto function, right?
Just some (random) questions:
What is the resolution of your game?
How about the colour depth?
Do these views used as snow have many frames?
Are the sprites used in these views very large?
One thought I have is, maybe the plug-in has to use a lot of memory/has some memory leaks, which causes the crash after some use of it. Since you have changed the Wait() from 100 frames to 40 frames, does this help make the crash less frequent? You may try to reduce this number a bit more to see whether it makes a different. Also, try to reduce the amount of snow and see if it helps.
Hi IceBoty
its 16 bit 640x480...
The views both have 2 frames (same image for each frame)...
the size of the new view is fairly large but not enormously large: 33x20 as opposed the the original snow view of 7x7.
It appears to give an error at the Wait() command. Of course you need it to Wait() for a few seconds so it shows the new view of falling ice chunks before returning to the view of small flakes.
I did reduce the Amount of snow to 10 for the new view.
I will try a bit more on another scene, meanwhile I am using using objects to simulate what i want... but as I have said, I will try it again in another scene.
Cheers IceBoty
barefoot