Streaming game development: https://www.twitch.tv/stabyourself Image

SE Custom Enemies Help Thread

Mapping related threads and questions go in here!
Tecminer
User avatar
Posts: 485
Joined: 11 Jan 2014, 20:44
Reputation: 180
Contact:

Post » 28 May 2015, 18:11

this

Code: Select all

{
   "quadcount": 1,

   "movement": "none",
   "stompable": false,
   "killsonbottom": false,
   "killsonsides": false,
   
   "animationtype": "frames",
   "animationstart": 1,
   "animationframes": 1,
   "animationspeed": 0.1,
   
   
   "nospritesets": true,
   
   "gravity": 0,

   "spawnsenemy": turretgun,
   "SpawnEnemyDelays": 0.1,
   
   "transforms": true,
   "transformsinto": turret,
   "transformtrigger": death,

   "lifetime": 0.2,
   
   "width": 1,
   "height": 1,
   
   "static": false,
   "active": true,
   
   "category": 4,
   
   "mask": [   true,
            true, 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": 0,
   "offsetY": 0,
   "quadcenterX": 8,
   "quadcenterY": 8
}

gets me this
Image

Squidish
User avatar
Posts: 807
Joined: 05 Apr 2014, 04:04
Reputation: 215
Contact:

Post » 28 May 2015, 20:37

I may be wrong, but i don't think you need an animation if there's only one frame. Either that or there's a spriteset and you didn't turn it on

TurretBot
User avatar
Posts: 4683
Joined: 15 Mar 2012, 23:18
Reputation: 719
Contact:

Post » 28 May 2015, 21:11

Squidish wrote:i don't think you need an animation if there's only one frame

use "none"

Tecminer
User avatar
Posts: 485
Joined: 11 Jan 2014, 20:44
Reputation: 180
Contact:

Post » 28 May 2015, 21:29

yea, i had "none" before, but there was an other error which was somehow fixed by adding the frames thing, but that was on an other enemy of which i copied the code to edit it. i can assure you that the error wasnt caused by the animationtype

WillWare
User avatar
Posts: 1222
Joined: 08 Mar 2012, 04:35
Reputation: 267
Contact:

Post » 28 May 2015, 23:47

Put quotes around "turretgun", "turret", and "death". Basically, if it's not true, false, or a number, it needs quotes.
What did Turret ever do to you? All that guns and death and stuff - he was only trying to help

Tecminer
User avatar
Posts: 485
Joined: 11 Jan 2014, 20:44
Reputation: 180
Contact:

Post » 29 May 2015, 18:34

alright, thats one problem solved, but since i didnt want the turret to keep shooting at the player forever, i tried to use the transformtrigger "playernear", but nothing happens...

Code: Select all

{
   "quadcount": 1,

   "movement": "none",
   "stompable": false,
   "killsonbottom": false,
   "killsonsides": false,
   
   "animationtype": "frames",
   "animationstart": 1,
   "animationframes": 1,
   "animationspeed": 0.1,
   
   
   "nospritesets": true,
   
   "gravity": 0,
   
   "rotatetowardsplayer": false,
   
   "width": 1,
   "height": 1,
   
   "static": false,
   "active": true,
   
   "category": 4,
   
   "mask": [   true,
            true, 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": 0,
   "offsetY": 0,
   "quadcenterX": 8,
   "quadcenterY": 8,

   "transforms": true,
   "transformsinto": "turretgunshooting",
   "transformtrigger": "playernear",
   "playerneardist": 5
   }

and yes, i DO have the newest enemy.lua

TKG
User avatar
Posts: 5
Joined: 22 Jul 2013, 02:23
Reputation: 0

Post » 30 Jun 2015, 04:05

Is there a way to make enemies transform after being hit by specific enemies (Like a custom explosion)?

Squidish
User avatar
Posts: 807
Joined: 05 Apr 2014, 04:04
Reputation: 215
Contact:

Post » 10 Jul 2015, 08:27

TKG wrote:Is there a way to make enemies transform after being hit by specific enemies (Like a custom explosion)?

Most likely by editing its mask

Polybius
User avatar
Posts: 316
Joined: 03 May 2012, 08:24
Reputation: 54

Post » 12 Jul 2015, 08:22

My attempt at a 16x16px diagonal Super Mario World 3 cannonball. I can't pin point the problem, Quadcount is 1, Nospritesets is true.

Image

Code: Select all

{
   "quadcount": 1,

   "movement": "none",
   
   "Nospritesets": true,
   "Animationtype": "none",
   
   "SpawnOffsetX": 0.1,
   "SpawnOffsetX": -0.1,
   "Width": 1,
   "Height": 1,
   "OffsetX": 0,
   "OffsetY": 0,

   "SpeedX": 1,
   "SpeedY": -1,
   "Gravity": 0,
   "Static": false,
   "Spawnsound": "bulletbull",
   "NotKilledFromBlocksBelow": true,
   "DontMirror": true,
   "doesntunrotate": true,
   "autodelete": true,
   

   "Active": true,
   "Category": 11,
   
   "mask": [   true,
            true, false, true, true, true,
            true, true, true, true, true,
            true, true, true, true, true,
            true, true, true, true, true,
            true, true, true, true, true,
            true, true, true, true, true],
   
   "StompComboSuppressor": false,
   "Stompable": true,
   "StompAnimation": false,
   "KilledByBoxes": true,
   "ignorefaithplates": true
}      
   



EDIT:

fixed:

Code: Select all

{

   "movement": "none",
   
   "Nospritesets": true,
   "Animationtype": "none",
   "DontMirror": true,
   
   "SpawnOffsetX": 0.0,
   "SpawnOffsetY": -0.5,
   "Width": 1,
   "Height": 1,
   "OffsetX": 0,
   "OffsetY": 0,
   "QuadcenterX": 0,
   "QuadcenterY": 0,

   "SpeedX": -3,
   "SpeedY": -3,
   "Gravity": 0,
   "Static": false,
   "doesntunrotate": true,
   "autodelete": true,
   "ResistsFire": true,
   "ResistsSpikes": true,
   "NoCollideStops": true,
   "Killsonbottom": true,
   "KillsonSides": true,

   "Active": true,
   "Category": 11,
   
   "mask": [   true,
            true, false, true, true,

true,
            true, true, true, true,

true,
            true, true, true, true,

true,
            true, true, true, true,

true,
            true, true, true, true,

true,
            true, true, true, true,

true],
   
   "StompComboSuppressor": true,
   "Stompable": true,
   "Spawnsound": "bulletbill",
   "StompAnimation": false,
   "KilledByBoxes": true,
   "ignorefaithplates": true
}      
   

Polybius
User avatar
Posts: 316
Joined: 03 May 2012, 08:24
Reputation: 54

Post » 14 Jul 2015, 22:36

how would i go about replicating these flame throwers from smb3?
Image

QwertymanO07
User avatar
Posts: 1374
Joined: 05 Oct 2012, 07:58
Reputation: 385
Contact:

Post » 14 Jul 2015, 22:57

I'd recommend an enemy with the lifetime property that kills you and another enemy to periodically respawn it.

Turtle95
User avatar
Posts: 1275
Joined: 21 Mar 2012, 21:48
Reputation: 122
Contact:

Post » 14 Jul 2015, 23:10

QwertymanO07 wrote:I'd recommend an enemy with the lifetime property that kills you and another enemy to periodically respawn it.


Wouldn't he just need an Enemy Spawner and set that on a loop?

Polybius
User avatar
Posts: 316
Joined: 03 May 2012, 08:24
Reputation: 54

Post » 14 Jul 2015, 23:52

I tried to make it a plant, but thats not gonna work... the sprite sheet is too big for that, its 3 blocks tall. so yeah ill have to try the enemy spawner thing

QwertymanO07
User avatar
Posts: 1374
Joined: 05 Oct 2012, 07:58
Reputation: 385
Contact:

Post » 15 Jul 2015, 00:26

Turtle95 wrote:Wouldn't he just need an Enemy Spawner and set that on a loop?

He could, but with the custom spawner method, he can just place the enemy and not have to change any settings or do any linking.

Polybius
User avatar
Posts: 316
Joined: 03 May 2012, 08:24
Reputation: 54

Post » 15 Jul 2015, 02:24

Could someone go about explaining so i can try to go about doing it? :P

heres my attempt at it. it's not working so far :P

Code: Select all

{
   "Quadcount": 5,
   "nospritesets": true,
   "movement": "none",

   "animationtype": "frames",
   "animationstart": 1,
   "animationframes": 5,
   "animationspeed": 0.3,
   
   "stompable": false,
   "kills": true,
   
   "width": 1,
   "height": 1,
   "static": true,
   "active": true,
   "category": 29,
   
   "mask": [true],
   
   "emancipatecheck": true,
   "notkilledfromblocksbelow": true,
   "jumpsfromblocksbelow": false,
   "autodelete": true,
   "portalable": false,
   "resistsstar": true,
   "resistsfire": true,
   "resistsspikes": true,
   
   "offsetx": 6,
   "offsety": 0,
   "quadcenterX": 8,
   "quadcenterY": 19,
   "ignorefaithplates": true
}

QwertymanO07
User avatar
Posts: 1374
Joined: 05 Oct 2012, 07:58
Reputation: 385
Contact:

Post » 15 Jul 2015, 05:55

You need the property "lifetime": # somewhere in there or else it won't delete itself.

The spawner should be something like this:

Code: Select all

{
   "quadcount": 1,

   "movement": "none",
   
   "animationtype": "none",
   
   "spawnsenemy": "whatever you called it",
   "spawnenemydelays": [5],
   "spawnenemyspeedy": 0,
   "spawnenemyspeedx": 0,
   "spawnenemyoffsetx": -1,
   
   "width": 0.75,
   "height": 0.75,
   
   "static": true,
   "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
}

QwertymanO07
User avatar
Posts: 1374
Joined: 05 Oct 2012, 07:58
Reputation: 385
Contact:

Post » 05 Aug 2015, 01:21

Sorry for the double post, but I just have a question: has anybody had the movement type "targety" work? I found it while looking through enemy.lua, and couldn't get it to work, though I only tried it once.

Polybius
User avatar
Posts: 316
Joined: 03 May 2012, 08:24
Reputation: 54

Post » 06 Aug 2015, 20:13

I believe its for the blooper movement type. I may be incorrect, but that is my best bet.

QwertymanO07
User avatar
Posts: 1374
Joined: 05 Oct 2012, 07:58
Reputation: 385
Contact:

Post » 07 Aug 2015, 00:37

No, their movement is "squid".

Unrelatedly, is there any way to make an enemy spawn another enemy only once?

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 15 Aug 2015, 20:34

My enemy, Green Spikey, causes a crash:
Image

Here is the code:

Code: Select all

base=spikey

{
    "quadcount": 2,
   "NoSpriteSets": false,

    "movement": "follow",
   "DistanceTime": 0.1,
   "followspace":0.1,
   "killsontop": true,
   "killsonsides": true,
   
   "stompable": false,
}


And the sprite:
Image

There is also Green Spikey Lakito, but it's just a normal Lakitu that throws Green Spikeys. It even uses the same sprite!
Last edited by Murphmario on 15 Aug 2015, 21:04, edited 1 time in total.

TurretBot
User avatar
Posts: 4683
Joined: 15 Mar 2012, 23:18
Reputation: 719
Contact:

Post » 15 Aug 2015, 20:47

Why is there a ]?

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 15 Aug 2015, 21:05

TurretBot wrote:Why is there a ]?


Fixed. That wasn't part of the original code. I must have put it there when I was copypasting the code over to the forums.

Squidish
User avatar
Posts: 807
Joined: 05 Apr 2014, 04:04
Reputation: 215
Contact:

Post » 15 Aug 2015, 21:07

Murphmario wrote:Here is the code:

Code: Select all

base=spikey

{
    "quadcount": 2,
   "NoSpriteSets": false,

    "movement": "follow",
   "DistanceTime": 0.1,
   "followspace":0.1,
   "killsontop": true,
   "killsonsides": true,
   
   "stompable": false,
}

You're not supposed to have a comma on the last line.

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 15 Aug 2015, 21:10

Squidish wrote:
Murphmario wrote:Here is the code:

Code: Select all

base=spikey

{
    "quadcount": 2,
   "NoSpriteSets": false,

    "movement": "follow",
   "DistanceTime": 0.1,
   "followspace":0.1,
   "killsontop": true,
   "killsonsides": true,
   
   "stompable": false,
}

You're not supposed to have a comma on the last line.


Didn't fix anything. The game still crashes.

TurretBot
User avatar
Posts: 4683
Joined: 15 Mar 2012, 23:18
Reputation: 719
Contact:

Post » 15 Aug 2015, 21:14

Murphmario wrote:The game still crashes.

does it show the same message?

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 15 Aug 2015, 22:22

TurretBot wrote:
Murphmario wrote:The game still crashes.

does it show the same message?


For the most part, yes. But I edited the codes to remove the commas.

Squidish
User avatar
Posts: 807
Joined: 05 Apr 2014, 04:04
Reputation: 215
Contact:

Post » 15 Aug 2015, 22:38

Murphmario wrote:
TurretBot wrote:
Murphmario wrote:The game still crashes.

does it show the same message?


For the most part, yes. But I edited the codes to remove the commas.

You're not supposed to take out all the commas. just the one on the last line.

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 15 Aug 2015, 23:27

Squidish wrote:You're not supposed to take out all the commas. just the one on the last line.


Tried that too.

WillWare
User avatar
Posts: 1222
Joined: 08 Mar 2012, 04:35
Reputation: 267
Contact:

Post » 16 Aug 2015, 18:33

Character #184 is at "killsonsides." So something there is throwing the error. Since you're using a spikey as a base, it already has that property, so you can remove it and "killsontop" and it will still function correctly, hopefully without error.

Just to be safe, make sure you have a comma on the end of every line except the last, and add a space between "followspace" and its value (I'm not sure if JSON parsing throws an error for this or not, but it's good to be consistent anyway).

Murphmario
Posts: 54
Joined: 03 Feb 2014, 23:24
Reputation: 9

Post » 16 Aug 2015, 22:12

WillWare wrote:Character #184 is at "killsonsides." So something there is throwing the error. Since you're using a spikey as a base, it already has that property, so you can remove it and "killsontop" and it will still function correctly, hopefully without error.

Just to be safe, make sure you have a comma on the end of every line except the last, and add a space between "followspace" and its value (I'm not sure if JSON parsing throws an error for this or not, but it's good to be consistent anyway).


It still crashes. Here is the new code:

Code: Select all

base=spikey

{
    "quadcount": 2,
   "NoSpriteSets": false,

    "movement": "follow",
   "DistanceTime": 0.1,
   "followspace": 0.1,

   "stompable": false
}

WillWare
User avatar
Posts: 1222
Joined: 08 Mar 2012, 04:35
Reputation: 267
Contact:

Post » 16 Aug 2015, 23:38

Could you post the new crash as well? It helps a ton when debugging enemies.


Return to “Mapping”

Who is online

Users browsing this forum: No registered users and 1 guest

cron