Playcraft

Playcraft

Easily create and play multiplayer games with your friends!

Learn more and find the game on Steam, Discord, Facebook, Twitter.

Basic Triggers (Create Respawning Health Box)

This is a guide showing basic trigger features in PlayCraft! In this guide, we will heal any player that touches a block, destroy the block so no one else can use it, then respawn it after some time so it can be used again.

2 comments

Posted by on (updated ago)



Make a block heal a player on touch!


We can apply triggers to any object. In this guide, we will use a standard block --> block

Step 1


Place a block when in edit mode.

(You can cycle modes by pressing T for a vote to change the mode, or force change the mode with CTRL+T)

Step 2


After you have placed a block, press E while looking at it to open the menu as seen below.

Step 3

You will find the triggers button triggersymbol on the left hand side of the block menu. Click it to open the triggers menu.

(This is the menu where we will setup what effects will happen, and what triggers those effects.)

Step 4


Leave Touch highlighted at the top as we want the effect to trigger only when the block is touched.

And now click the orange Add triggered effect button and we will start defining what the trigger does.

The only settings you should change is:

1. The name to "Heal Player" | 2. Make sure "Target", "All" and "Characters only" buttons are highlighted.

Step 5


Once your menu is setup like the picture in Step 4, go ahead and click the Add effect button to load all the usable effects.

We want to click the Heal button and set the Heal amount to 100.


Once all the above steps were followed, touching the block in play mode will heal you! (Press T to switch to play mode)






Making a block destroy after healing a player.


Assuming you have followed all instructions to this point, we are ready to destroy the block after touch.

This is mainly useful for one use items that respawn. (We will get to the respawning blocks soon.)

Add another touch trigger by clicking the orange Add triggered effect while the touch button is still highlighted.

Name this second trigger Damage Object, and choose Self this time.

damageobjsettings

Click Add effect button again under this second trigger and this time instead of Heal, choose Damage and set the Damage amount to 100.

damageeffectsettings

At this point, you should have a block that heals your player and then destroys itself so no one else can collect it.


Make a block respawn after being destroyed.


Assuming you followed ALL the previous instructions, making your health box respawn after a certain time is easy.

Simply open the block menu and scroll down until you find Respawn time, set that to how many seconds you need.

(Setting respawn time to Zero will disable respawning.)

respawntimeadjust

2 comments

Join the community or sign in with your gaming account to join the conversation:

BobiTheBuilder
BobiTheBuilder @bobithebuilder

Great Article! Tutorials like that are really nice to have for new players!

Zvrra
Zvrra @zvrra

Thanks! What about making some more advanced guides?