Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Easy FPS Editor v1.6

Simple way to create an old-school First Person Shooter! · By JessicoChan

How can I stop script from repeating on terminals?

A topic by GoldenWolfe15 created Jun 18, 2022 Views: 398 Replies: 14
Viewing posts 1 to 3

Basicly i want text box that shows up once but player has to click on it. Thanks in advance. 

do you mean you want to no longer be able to activate the script from that terminal after the first time?

if so i think it could be done with variables

Ye mate

Here's an example:

if $map.supervariable == 0
{
//PLACE YOUR SCRIPT THINGS HERE//
map.supervariable=1
}

map return

Thanks 

(3 edits)

i have a issue each time i run it .IT just crashes heres my script btw

image idle Sprites/Enemies/solider0.png

value=0

if $value==0

{

vn 1

show idle 0 0 2

text "Hello!" 0 0 2

timeout 2

text "HEWWO"

value=1

}

map return

Once again:

if $map.supervariable == 0

{

//PLACE YOUR SCRIPT THINGS HERE//

map.supervariable=1

}

You do realise why I have written it as "map.supervariable"? Because there's a two types - map and global. map works for the map you're playing rn and global is working on the whole game.

Fixed it thanks for help 

Btw can i put scripts into enemies and count how many are killed and like that? 

You can't put scripts into enemies. Only for level start, terminals, triggers and decorations.
Kill count can be done by using states. My little Wolf3D recreation is a good example how it was done. It's not packed so you can learn:

https://keshafilm.itch.io/awolf3dr

yeah i thought the kill count feature in the wolf clone was really awesome. i need to take a closer look at it. i really enjoyed your secret walls, i just didn't understand them when i first opened the project. over all it is a very good example of the sort of more advanced things that can be done with scripting

I wanna mention thanks for the wiki really helped me figuring some stuff out 

you are welcome. that is what it is for. i am half-assed working on a n00b tutorial and a starter project that ppl can just open up and start mapping without needing to make resources.

progress on updating the wiki has stalled for now. i keep joining game jams :)

Intresting thanks also about decoration could ya give example how could i insert script without breaking anything? 

i dont know what you mean about not breaking anything, but to make a decoration have a script you just make a script called decorationname.script

when you "use" the decoration the script will be executed. if it breaks then script is fucked up.

also you cant "use" decorations on upper floors. so you will have to map around that by keeping your useable decorations on first floor.