[Mari0 SE] NEW enemy.lua

General Mar0 discussion has been moved to this subforum!
Post Reply
User avatar
alesan99
Posts: 2335
Joined: 30 May 2013, 21:42
Contact:

Post » 15 Nov 2014, 21:13

I figured I should make a thread for this.
Maurice let me work on enemies on Mari0 SE. Some enemies may be incompatible if you don't use this.
An old version is in the latest beta but if you want the most recent version of the enemy.lua the download it here.
Install it by adding replacing the enemy.lua in mari0 se.

DOWNLOAD: https://www.dropbox.com/s/s2potbu3spcd7 ... y.lua?dl=0

CHANGELIST:

Code: Select all

ADDED: "givecoinwhenstomped": boolean   (gives coin when stomped)
ADDED: "givecoinwhenshot": boolean   (gives coin when shot)
ADDED: "followspeed": decimal   (how fast the enemy will follow you(if movement is set to "follow"))
ADDED: "shotjumpforce": decimal   (shot jumpforce duh)
ADDED: "shotspeedx": decimal   (shot speedx)
ADDED: "fallswhenstomped": boolean   (falls when stomped, even if it has a stomped frame)
ADDED: "health": integer   (health, decreased when shot or stomped)
ADDED: "customtimer": array   (put arrays in the array, the first slot is the delay, the second one is the action, the third one are the arguments)
   ACTIONS
   "bounce"
   "playsound"
   "setframe"
   "set[PARAMETER HERE]"   
ADDED: "chasetime": decimal   (chase mario after a x seconds (like hammer bros in SMB))
ADDED: "chasespeed": decimal
ADDED: "breaksblocks": boolean
ADDED: "breakblockside": string   (what side to break)
ADDED: "spawnsenemyrandoms": array   (spawns a random enemy)
ADDED: "flyingtime": decimal
ADDED: "flyingdistance": decimal
ADDED: "reflects": boolean   (bounces off of tiles)

ADDED: tranformtriggers: "rightcollide", "leftcollide", "ceilcollide", "globalcollide", "collide", "death", "shot", "collidewith" .. enemyname
ADDED: movements: "flyvertical", "flyhorizontal" (flying koopas)

FIXED: dontpistondist not working

----------------------------------------------------

ADDED "shothealth": integer
ADDED "stomphealth": integer
ADDED "transformtriggerobjectcollide": string   (transforms when it collides with an object)
ADDED "transformtriggerenemycollide": string   (transforms when it collides with an enemy)
ADDED "playerneardist": integer   (enemy will transform when player is this near (horizontal))
ADDED "playerneardist": array   (same as above, but you can select a region. set up array like this: [x, y, width, height])
ADDED "staticIfSeen": boolean   (becomes static when player faces the enemy)
ADDED "staticIfNotSeen": boolean   (opposite of above)
ADDED "rotatetowardsplayer": boolean   (faces player in all directions)
ADDED "nofollowspeedup": boolean   (enemy the enemy's movement is "follow" it won't speed up when the player is far)
ADDED "transformsintorandoms": array
ADDED "transformpassedparameters": array   (parameters that get passed on once the enemy transforms)

ADDED customtimer actions:
	"reverse[PARAMETER HERE]"   (turns positive to negative and negative to positive)
	"add[PARAMETER HERE]"
	"multiply[PARAMETER HERE]"

ADDED transformtriggers: "lifetime", "playernear", "playernotnear", "seen", "notSeen"

FIXED collide with specific entity transform trigger
FIXED enemy being visible for one frame after it transformed (You won't have to make an empty frame anymore, Baf).

REMOVED transformtriggers: "collidewith"
Some enemies to use with it: viewtopic.php?f=12&t=4235

User avatar
JohnHOne
Posts: 300
Joined: 13 Jul 2014, 23:55

Post » 15 Nov 2014, 22:20

Thank you alesan99
i will release later a update containing your new enemy.lua
i will include some of your enemys
when i release,i will credit you,for your enemy pack and the bug fix

User avatar
JohnHOne
Posts: 300
Joined: 13 Jul 2014, 23:55

Post » 15 Nov 2014, 23:21

help,my enemy do not transform when its close,i have the new enemy.lua

insert minecraft joke here
{
"quadcount": 2,

"movement": "truffleshuffle",
"stompable": true,
"killsonbottom": true,
"killsonsides": true,

"animationtype": "mirror",
"animationspeed": 0.2,

"stompanimation": true,
"stompanimationtime": 0.5,
"stompedframe": 2,

"truffleshufflespeed": 2,
"truffleshuffleacceleration": 8,

"quadno": 1,

"width": 0.75,
"height": 0.75,

"static": false,
"active": true,

"category": 4,

"mask": [ true,
false, false, false, false, true,
false, true, false, true, false,
false, false, false, false, false,
true, true, false, false, false,
false, true, true, false, false,
true, false, true, true, true],


"emancipatecheck": true,
"autodelete": true,

"offsetX": 6,
"offsetY": 3,
"quadcenterX": 8,
"quadcenterY": 8
}
{
"transforms":"true"
"transformsinto":"creeperbomb"
"transformtriggers": "playernear"
}

User avatar
alesan99
Posts: 2335
Joined: 30 May 2013, 21:42
Contact:

Post » 16 Nov 2014, 00:37

You have to define "playerneardist"

Also post anything you need help with in the custom enemy help thread.

Post Reply