![]() |
Party lights script
well i have a question in the following script how can i make it keep changing the backpal without stoping?
// NPC made by Draktha if (playerenters) { setbackpal afirebackpal.gif; sleep.5; setbackpal duskpal.png; sleep.5; setbackpal picsgold.gif; sleep.5; setbackpal picsgravity.gif; sleep.5; setbackpal picslightblue.gif; sleep.5; setbackpal picsyellowgreen.gif; } if (playersays(party lights off)) { setbackpal pics1.png} if (playersays(party lights on)){ setbackpal afirebackpal.gif; sleep.5; setbackpal duskpal.png; sleep.5; setbackpal picsgold.gif; sleep.5; setbackpal picsgravity.gif; sleep.5; setbackpal picslightblue.gif; sleep.5; setbackpal picsyellowgreen.gif; } oh and i dont care if u steal it.. it doesnt work right anyways |
use a timeout
|
...?
:confused:Timeout?:confused: well i dont know how to use a timeout.. sry im kinda a N00b scripter. please explain....:(
|
ie:
if (playerenters) {timeout = 0.5; } if (timeout) { setbackpal afirebackpal.gif; sleep.5; setbackpal duskpal.png; sleep.5; setbackpal picsgold.gif; sleep.5; setbackpal picsgravity.gif; sleep.5; setbackpal picslightblue.gif; sleep.5; setbackpal picsyellowgreen.gif; timeout = 0.5; message Entravial rules you!; } You must leave entravial rules you in there for it to work |
Sleep script is the thing that stops it before it needs to be like:
sleep 0.5; |
Oh yeah if that script gets up it will be VERY VERY lagy and I use ADSL
|
it'd only be laggy client-side if you have a slow computer...
NPC Code: hehe, for extra super fun change this.speed to .05 ;) |
oh here comes kyle with his fancy scripting :mad:
hehe. that's the hard way to do it, i just use the easy way, even if it is long. unless the hard way is the better way |
heh, it's actually better in the long run....cuz if you want to add stuff to the script later you don't have to mess with sleeps. I ALWAYS used to use a while loop with sleeps in it, for about 3 months when I started scripting. Then I finally learned timeout and have used it ever since.
Sleep freezes the script, so nothing else can run. So say you wanted to have one script that moved things at different speeds. You couldn't do it with sleep (well, you could, but it'd be longer), but with timeout it's a simple matter of adding a counter and checking the value of the counter. |
Switching backpals that often is laggy. Try seteffect instead.
|
he's right, seteffect will work better for this situation. (setbackpal would be better for like changing the tileset appearance (grass to snow))
|
mmm
|
OMG, i never realized kyle was such a good scripter.
|
lol, and you have never stolen one of his scripts :rolleyes:
|
I dont think so, I have the bomy script but that was given to me
|
a lot of people have every script, it's just useless unless you have the NPC (Server)
|
Only one person has MY final version of the bomy-boots script (other than Antago and Stefan)...
|
Quote:
|
I have the bomy level with the 5 different bomy's you can pick from, you can swim in the river, you can jump off the cliff, you can play hacky, you can eat bombs.. its pretty complete i would imagine =) I can't even remember who I got it from
|
lol, if it can play hacky it's not my final version ;)
I'm not telling who has it, cuz I don't want them to be bombarded with "can I have the bomy script please!?!" It has kicking in it though ;) |
wow cool, :D I havent ever seen Antagano online. =\ hes a ghost :eek:
|
The version I have seems complete.. it has everything, including kicking, ducking, using the health thing, eating bombs, kicking bushes.. etc Maybe it got passed around.. or someone made it into another level heh heh
|
I'd give my version out...but it's too old to be very useful other than some of the onwall stuff, and it's pretty darn confusing...I'm also not sure if Stefan would approve me handing it out either though...cuz people could and would copy it.
|
Yeah but what will they do with it?
There will be like 3 people who actually understand it (i'm guessing you used alot of C,G and that stuff functions like you usually do) and they would be smart enough not to copy it. And the people who do copy it will just stick it on thier server, which won't even make it on! |
| All times are GMT +2. The time now is 12:35 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.