Classic Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back. Discord - https://discord.gg/U7C8YNYF63

Pages: 1 ... 4 5 [6] 7 8 ... 10
 51 
 on: November 07, 2017, 10:35:24 PM 
Started by maximus_asinus - Last post by Skyzer
So you don't have to call TimeOut for a single function.

 52 
 on: November 01, 2017, 02:39:48 PM 
Started by Thor - Last post by Thor
https://avaloniaonline.com/forum/avalonia-development/under-development-games/grailway/3353-introducing-project-grailway

 53 
 on: October 30, 2017, 09:52:55 PM 
Started by maximus_asinus - Last post by Teerawut
It is an event that is very good. I'm waiting for this activity as well.

 54 
 on: October 30, 2017, 09:49:23 PM 
Started by maximus_asinus - Last post by Teerawut
Expand on Morgan It's the right thing to do.

 55 
 on: October 21, 2017, 04:39:10 AM 
Started by maximus_asinus - Last post by Inevitable
rip

 56 
 on: September 05, 2017, 12:34:56 PM 
Started by maximus_asinus - Last post by Thor
Following 2 months and 1 week Unixmad is proving once again that he is a disgrace and cannot be trusted.

 57 
 on: August 20, 2017, 06:59:17 PM 
Started by maximus_asinus - Last post by maximus_asinus
Is there a reason why you prefer one over the other? They appear to function the same if you're using it in that manner.

 58 
 on: August 20, 2017, 03:27:36 PM 
Started by maximus_asinus - Last post by maximus_asinus
Most "can i b admin"s aren't a big deal. But occasionally you get someone who spends hours/days/weeks/months begging for it non stop.
The worst I've had is someone ask about 3 times, and when I didn't respond he kindly told me to fellate him.

But I've only been at this a few weeks. ;)

 59 
 on: August 20, 2017, 01:23:16 PM 
Started by maximus_asinus - Last post by Racil
Don't remember, did that guy who was following me and my friends for over a year also beg to be admin for that long, or just ask you to make a server for him?
Or maybe he never actually asked to be admin, just for you to make him a server?

 60 
 on: August 20, 2017, 06:19:28 AM 
Started by maximus_asinus - Last post by Thor
Code: [Select]
function onPlayerEnters() {
  if (client.waterfilled = true) {

Using a single = will always treat the conditional as TRUE, it should be ==. Better yet if you're storing boolean values (true/false or 1/0) you can just do:

Code: [Select]
function onPlayerEnters() {
  if (client.waterfilled) {

or

Code: [Select]
function onPlayerEnters() {
  if (!client.waterfilled) {

--------

Rather than use a timeout I use scheduleEvent(), which can be cancelled with cancelEvents("action").

Code: [Select]

function onFillWater() {
  //blah blah
  this.scheduleEvent(0.2, "FillWater");
}

function onDrainWater() {
  //blah blah
  this.scheduleEvent(0.2, "DrainWater");
}

function stopFill() {
  //blah blah
  this.cancelEvents("FillWater");
}

function stopDrain() {
  //blah blah
  this.cancelEvents("DrainWater");
}


Pages: 1 ... 4 5 [6] 7 8 ... 10