brmbrmcar's script for enemy/kill bonusblock

brmbrmcar's script for enemy/kill bonusblock

Postby DatTuxBoi » 21 Apr 2018, 10:56

This is to brmbrmcar since i am a noob at PM's and such.
brmbrmcar, what is the script for spawning an enemy/kill Tux on a Bonus Block? :) ;)
Attachments
Capture.PNG
Previously known as DatTuxBoi.
aka Windows Vista

I am a furfag
uwu uwu uwu uwu
User avatar
DatTuxBoi
 
Posts: 78
Joined: 01 Apr 2018, 07:55

Re: brmbrmcar's script for enemy/kill bonusblock

Postby brmbrmcar » 21 Apr 2018, 11:54

Killing Tux is not very difficult to do. You just have to set the script of the block to sector.Tux.kill(true). If you only want to hurt him sector.Tux.kill(false) works.

Setting the block to a badguy is a little more difficult, because you can't do it in the editor. You have to edit the level file in a text editor. You want to find the bonus block you want to change, and set contents to "custom" then add a new line with the badguy in. For example, for an Iceblock it should look something like this:
{l Code}: {l Select All Code}
    (bonusblock
      (sprite "images/objects/bonus_block/bonusblock.sprite")
      (x 189.3336639)
      (y 384.616272)
      (contents "custom")
(mriceblock)
    )


If you have any more questions or need more help please ask me.
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: brmbrmcar's script for enemy/kill bonusblock

Postby DatTuxBoi » 21 Apr 2018, 12:36

brmbrmcar {l Wrote}:
Setting the block to a badguy is a little more difficult, because you can't do it in the editor. You have to edit the level file in a text editor. You want to find the bonus block you want to change, and set contents to "custom" then add a new line with the badguy in. For example, for an Iceblock it should look something like this:
{l Code}: {l Select All Code}
    (bonusblock
      (sprite "images/objects/bonus_block/bonusblock.sprite")
      (x 189.3336639)
      (y 384.616272)
      (contents "custom")
(mriceblock)
    )


If you have any more questions or need more help please ask me.


It disappears, and i wrote every single letter in the script box, and set the type of bonusblock to script.


Besides that,

THANK YOU SENPAI FOR SHARING THE SECRETS OF SUPERTUX LEVEL EDITING!
Previously known as DatTuxBoi.
aka Windows Vista

I am a furfag
uwu uwu uwu uwu
User avatar
DatTuxBoi
 
Posts: 78
Joined: 01 Apr 2018, 07:55

Re: brmbrmcar's script for enemy/kill bonusblock

Postby brmbrmcar » 21 Apr 2018, 12:44

For a script you don;t have to actually set the bonus block type I;m pretty sure.
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: brmbrmcar's script for enemy/kill bonusblock

Postby DatTuxBoi » 21 Apr 2018, 12:54

~it would give me a coin
Previously known as DatTuxBoi.
aka Windows Vista

I am a furfag
uwu uwu uwu uwu
User avatar
DatTuxBoi
 
Posts: 78
Joined: 01 Apr 2018, 07:55

Re: brmbrmcar's script for enemy/kill bonusblock

Postby brmbrmcar » 21 Apr 2018, 12:56

Did you try and copy and paste it in directly? If so that won't work very well because x and y positions will be different. I don't see why that would give a coin.
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Who is online

Users browsing this forum: No registered users and 1 guest