Post by lgb3d on Jul 21, 2022 20:35:41 GMT -5
In this tutorial I am going to describe how to repopulate a map with enemies. I am utilizing GCS version 1.3 for windows.. I would assume this technique would work with later releases of the GCS, but I have not tested.
How this might be employed in gameplay?
Perhaps your player makes his way through the level clearing the enemies, on his way back he is surprised, now there's more enemies..
Perhaps your player sees an empty room.. and when he steps in like magic he is surrounded by hostile enemies.
In advance cases this technique could be utilized to make a new enemy appear every time an existing enemy is wounded.. not an infinite Loop but as many lines of code as you want to run, and as many digits IE Universal registers as you want to keep track of.. as well capped by the memory and World limitations of your version of the GCS..
............
Briefly to describe how this functions.
The enemy is always present he is not invisible through Creator creativity, you disguise the enemt, within the bounds of your maps gameplay... essentially you locate the enemy exactly where he will first appear..
The enemy that is placed will not walk move or react to the player in any way until he is called in two gameplay by [register] [value]..
Essentially what we are doing is putting an enemy on pause out of the players sight.
When placing an enemy for this, the only absolute must is utilize "stand and shoot only" .. any other guard perimeters you wish you can employ when placing your enemy. So if you want him to have much resistance to damage, be super intelligent fast-moving very alert, as well as adjusting the object attributes so he might carry a specific inventory item with a value..
So you place your enemy within the level, you set him to stand and shoot only.
(Important... When selecting him and adjusting the attributes, in the third Red Box is where you will place his behavior number which makes this whole thing function.)
.............
How will we make this work?
We will be utilizing "GEXT00.4TH" .. this is a script for enemies on a level, you can make them all have unique programs and missions or set groups of them apart using this enemy scripting function.
There is a great resource explaining the basics of this script format for the GCS..
web.archive.org/web/20021219083948/http://www.pieskysoft.org/man30_html/enemprog.html
.........
Just a visual
See picture below, enemy is hidden utilizing elevation, he is at the top of the picture circled in green, from nowhere Within game play can the player see the enemy at that height (on my level). Based upon your level layout and architecture you might need to use a different elevation, or you could hide them just on the other side of a textured floor or ceiling panel you place with the extra features editor. As well if you're using lighting effects it's easy to hide them in the shadow, so you might not have to go so high
.....
The following post will be.. a few action words, and a behavior word. The goal is that you will be able to copy and paste this into your script and see it function in your own project. And you can tweak it however you need to suit your project.
I really like the idea of shooting an enemy and another appearing but that would be a little complicated for me to explain. Essentially you would put the trigger ie action word in the guard wound situation located within the behavior. To do this multiple times each time the enemy is wounded he would have to change Behavior so his wound function would trigger another unique Universal register calling the next enemy into play..
so there you are you would have to write many unique action words Behavior words and utilize many Universal registers and keep track of it all.. and then employ, ugh... easier to figure out than it is to explain..
I strongly recommend reading the above referenced overview of fourth scripting for your enemies.. shoot print it out it's a great reference to have
How this might be employed in gameplay?
Perhaps your player makes his way through the level clearing the enemies, on his way back he is surprised, now there's more enemies..
Perhaps your player sees an empty room.. and when he steps in like magic he is surrounded by hostile enemies.
In advance cases this technique could be utilized to make a new enemy appear every time an existing enemy is wounded.. not an infinite Loop but as many lines of code as you want to run, and as many digits IE Universal registers as you want to keep track of.. as well capped by the memory and World limitations of your version of the GCS..
............
Briefly to describe how this functions.
The enemy is always present he is not invisible through Creator creativity, you disguise the enemt, within the bounds of your maps gameplay... essentially you locate the enemy exactly where he will first appear..
The enemy that is placed will not walk move or react to the player in any way until he is called in two gameplay by [register] [value]..
Essentially what we are doing is putting an enemy on pause out of the players sight.
When placing an enemy for this, the only absolute must is utilize "stand and shoot only" .. any other guard perimeters you wish you can employ when placing your enemy. So if you want him to have much resistance to damage, be super intelligent fast-moving very alert, as well as adjusting the object attributes so he might carry a specific inventory item with a value..
So you place your enemy within the level, you set him to stand and shoot only.
(Important... When selecting him and adjusting the attributes, in the third Red Box is where you will place his behavior number which makes this whole thing function.)
.............
How will we make this work?
We will be utilizing "GEXT00.4TH" .. this is a script for enemies on a level, you can make them all have unique programs and missions or set groups of them apart using this enemy scripting function.
There is a great resource explaining the basics of this script format for the GCS..
web.archive.org/web/20021219083948/http://www.pieskysoft.org/man30_html/enemprog.html
.........
Just a visual
See picture below, enemy is hidden utilizing elevation, he is at the top of the picture circled in green, from nowhere Within game play can the player see the enemy at that height (on my level). Based upon your level layout and architecture you might need to use a different elevation, or you could hide them just on the other side of a textured floor or ceiling panel you place with the extra features editor. As well if you're using lighting effects it's easy to hide them in the shadow, so you might not have to go so high
.....
The following post will be.. a few action words, and a behavior word. The goal is that you will be able to copy and paste this into your script and see it function in your own project. And you can tweak it however you need to suit your project.
I really like the idea of shooting an enemy and another appearing but that would be a little complicated for me to explain. Essentially you would put the trigger ie action word in the guard wound situation located within the behavior. To do this multiple times each time the enemy is wounded he would have to change Behavior so his wound function would trigger another unique Universal register calling the next enemy into play..
so there you are you would have to write many unique action words Behavior words and utilize many Universal registers and keep track of it all.. and then employ, ugh... easier to figure out than it is to explain..
I strongly recommend reading the above referenced overview of fourth scripting for your enemies.. shoot print it out it's a great reference to have