Hello Everybody! I wanted to create a level in which the player had to destroy 3 entities in order to move to the next room. I was thinking of using this to create a tutorial level.
I found out a script written by Benjamin whom wanted the player to pick up 3 keys in order to open a door. I thought of changing this script to destroy the three entities. So I created 3 destroy scripts for the entities:
The following three destroy scripts must be applied in the Destroy script for teh three entities that must be destroyed. NOTE: All the three entities must have a different destroy script: Entity 1 must have Destroy script 1; Entity 2 must have Destroy script 2; entity 3 must have destroy script 3. You change the order, but it does not make any change as each entity must have a differeent one.
[DESTROY SCRIPT 1]
;Artificial Intelligence Script
;Script created by Benjamin Aeilkema Edited by Beavey
desc = 3 entities destroyed to open door [Entity 1]
:state=0:activateifused=1, destroy
;End of Script
[DESTROY SCRIPT 2]
;Artificial Intelligence Script
;Script created by Benjamin Aeilkema Edited by Beavey
desc = 3 entities destroyed to open door [Entity 2]
:state=0:activateifused=2, destroy
;End of Script
[DESTROY SCRIPT 3]
;Artificial Intelligence Script
;Script created by Benjamin Aeilkema Edited by Beavey
desc = 3 entities destroyed to open door [Entity 3]
:state=0:activateifused=3, destroy
;End of Script
This is the script you must put in the MAIN AI script of the Remote door you want to open after haveing destroyed the three Entities. This script was initially created by Benjamin Aeilkema, and I give credit to him!
[Door Remote Main Script]
;Artificial Intelligence Script
;Script created by Benjamin Aeilkema Edited by Beavey
desc = 3 entities destroyed to open door [Door Remote Script]
;Triggers
:state=0,activated=1:state=10
:state=0,activated=2:state=40
:state=0,activated=3:state=70
:state=10,activated=2:state=20
:state=10,activated=3:state=30
:state=40,activated=1:state=50
:state=40,activated=3:state=60
:state=70,activated=1:state=80
:state=70,activated=2:state=90
:state=20,activated=3:state=200,setframe=0,sound=$0
:state=30,activated=2:state=200,setframe=0,sound=$0
:state=50,activated=3:state=200,setframe=0,sound=$0
:state=60,activated=1:state=200,setframe=0,sound=$0
:state=80,activated=2:state=200,setframe=0,sound=$0
:state=90,activated=1:state=200,setframe=0,sound=$0
:state=200:incframe=0
:state=200,frameatend=0:state=210,coloff
;End of Script
Let me know if everything works fine with you!
Beavey