PDA

View Full Version : Haunted Darknut Armor as a script?



symbiote
01-02-2008, 08:18 AM
Toying with build 704.
I'm wanting to create a darknut-like monster that, if hit with the hammer, splits into two monsters: a head (that flies about like a peahat) and a body. And, to make things even more annoying, they can both tribble back into the original monster if left unattended.
What I've made so far:
-Haunted Darknut (comparable to the blue darknut, becomes a Headless Darknut when struck).
-Darknut Helmet (clone of a peahat.)

What I am clueless about:
-don't know how to make the Darknut Helmet spawn under the conditions above.
-don't know how to make them tribble.

I've considered making a new monster for just the Headless Darknut, and lowering the armor of the original so it dies on a hammer strike (and spawns the two others). This would make the ordeal more difficult on the player, as the Headless Darknut would still have a shield...

Do I actually need an script to achieve this, or can this be done with just the enemy editor? All those Item1/Item2/etc. values with no clear markings... it hurts the head. (I've been looking for a complete or even an incomplete list of enemies and their assorted Item value possibilities. So far few fruit forthcoming).

_L_
01-04-2008, 05:30 AM
You need three enemies: Darknut, Helmet and Body. You can make the Helmet tribble if you change its Type to "Keese Tribble", and you can make the Body tribble if you change its Type to "Gel Tribble". (The Gel's movement is entirely defined by its Halt Rate and Step Speed, so change those appropriately.)

But currently, there's no way to make a Darknut split into two varieties of enemy. Maybe you could set the Darknut to split into just one Helmet, and use my Reviving Enemies (http://www.armageddongames.net/forums/showthread.php?t=100726) script to make the body appear as well? (Of course, this means that the Tribbled-up Helmet won't be able to split into a body either, but personally I think that's a prudent design decision.)

Gleeok
01-04-2008, 07:49 AM
pish posh. We should be able to have enemies split into all kinds of things. So here's a little something that you can use with the reviving enemies script if you like. You can set it to split into four different kinds of enemies, with a total of 255 (I think) max enemies. Here's something cool; You can use it to create a Digdogger that normally splits into x amount of 4 kinds of enemies, plus the x amount of up to 4 enemies the script splits it into, maybe the reviving enemy script and C's boss booster or instill energy, plus my upcoming sabotage_enemy and fuse_enemies scripts (WIP!) , and now you're cooking.


disclaimer: This script is untested, but I will fix any/all problems it may have...if any.



//import "std.zh"
//D0-enemy_ID, D1-max enemies to split into
//D2-D5: ID of splittees (0-don't create splitter for that D[]variable)
ffc script splitter_spawner{

void run(int eid, int e_max, int s1, int s2, int s3, int s4){

bool init = false;
npc e;

while(true){

if(init == false){

e = Screen->CreateNPC(eid);
init = true;
}
else {

if(!(e->isValid())){

if(s1>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s1);
s->X = this->X;s->Y = this->Y;
}
}
if(s2>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s2);
s->X = this->X;s->Y = this->Y;
}
}
if(s3>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s3);
s->X = this->X;s->Y = this->Y;
}
}
if(s4>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s4);
s->X = this->X;s->Y = this->Y;
}
}
Waitframe();
this->Data = 0;
Quit();
}
if(e->isValid()){
this->X = e->X;
this->Y = e->Y;
}
Waitframe();
}
}
}


Let me know the status of this and/or suggestions. I do love the enemy scripts you know. :heart:

Dont be afraid to post enemy script requests.


Oh, and if you haven't already imported std.zh yet just remove the "//" from this line:
//import "std.zh"

Gleeok
01-05-2008, 04:16 AM
Oops! Sorry 'bout that.



ffc script splitter_spawner{

void run(int eid, int e_max, int s1, int s2, int s3, int s4){

bool init = false;
npc e;

while(true){

if(init == false){

e = Screen->CreateNPC(eid);
init = true;
}
else if(!(e->isValid())){

if(s1>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s1);
s->X = this->X;s->Y = this->Y;
}
}
if(s2>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s2);
s->X = this->X;s->Y = this->Y;
}
}
if(s3>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s3);
s->X = this->X;s->Y = this->Y;
}
}
if(s4>0){
for(int i; i < e_max; i++){
npc s = Screen->CreateNPC(s4);
s->X = this->X;s->Y = this->Y;
}
}
Waitframe();
this->Data = 0;
Quit();
}
else{
this->X = e->X;
this->Y = e->Y;
}
Waitframe();
}
}
}