Condition Index

Any information about the fun attribute is given here.

Moderator: Plugin Moderators

User avatar
Imran M
Inhabitant of a Megacity
Reactions:
Posts: 236
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Re: Condition Index

Post by Imran M » Sun Feb 10, 2019 19:52

Wait a minute, would this work?

Code: Select all

 "fun":{"condition":{"type":"rnd","min":0,"max":3,"frame":0},"action":{"type":"animation resume","frame":1,"level":0},"else action":{"type":"animation resume","frame":1,"level":1}} 
The condition is what number it is from the range, the action resumes with the first animation, if the number doesn't match a number from the range, it uses the second animation and flys safely, am I right? I think I haven't used frames correctly
I HATE doing roofs, and I can't find any good window colours. :bb
I can also help, most of the time. As long as it's fun, or something easy, like making Json files.

My avatar is very original.

User avatar
CommanderABab
AB
Reactions:
Posts: 7026
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Condition Index

Post by CommanderABab » Sun Feb 10, 2019 22:21

Code: Select all

[{
	"fun": {
		"condition": {
			"type": "rnd",
			"min": 0,
			"max": 3,
			"frame": 0
		},
		"action": {
			"type": "animation resume",
			"frame": 1,
			"level": 0
		},
		"else action": {
			"type": "animation resume",
			"frame": 1,
			"level": 1
		}
	}
}]
which one is the pause? (Nevermind!)
587587Currently using beta 587. 587 What's new? :)
bus routes are supposed to be fixed!!
:cry:

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
CommanderABab
AB
Reactions:
Posts: 7026
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Condition Index

Post by CommanderABab » Sun Feb 10, 2019 22:27

Code: Select all

[{
	"fun": [{
		"condition": {
			"type": "rnd",
			"min": 0,
			"max": 3,
			"frame": 0
		},
		"action": {
			"type": "animation resume",
			"frame": 1,
			"level": 0
		},
		"else action": {
			"type": "animation resume",
			"frame": 1,
			"level": 1
		}
	}]
}]
587587Currently using beta 587. 587 What's new? :)
bus routes are supposed to be fixed!!
:cry:

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Imran M
Inhabitant of a Megacity
Reactions:
Posts: 236
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Re: Condition Index

Post by Imran M » Fri Feb 15, 2019 12:58

CommanderABab wrote:
Sun Feb 10, 2019 22:27

Code: Select all

[{
	"fun": [{
		"condition": {
			"type": "rnd",
			"min": 0,
			"max": 3,
			"frame": 0
		},
		"action": {
			"type": "animation resume",
			"frame": 1,
			"level": 0
		},
		"else action": {
			"type": "animation resume",
			"frame": 1,
			"level": 1
		}
	}]
}]
So would this be the correct code?
I HATE doing roofs, and I can't find any good window colours. :bb
I can also help, most of the time. As long as it's fun, or something easy, like making Json files.

My avatar is very original.

User avatar
Lobby
Developer
Reactions:
Posts: 3217
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Re: Condition Index

Post by Lobby » Fri Feb 15, 2019 14:16

Imran M wrote:
Sun Feb 10, 2019 14:16
So rnd picks a number from 0-9, min and max means a range of numbers it can choose. would i put action, then type:frame, and frame:x? Is this correct?
No, it picks a number from 0 to (frame-1), so you'd have to change at least the value of frame:

Code: Select all

"condition": {
  "type": "rnd",
  "min": 0,
  "max": 3,
  "frame": 10
}
Please test the code and if it doesn't work as intended then let us know what exactly you expected and what happened instead.
...Have a nice stay

Post Reply Previous topicNext topic

Return to “Fun attribute”

Who is online

Users browsing this forum: No registered users and 1 guest