Jump to content

Photo

3 Flags


  • Please log in to reply
9 replies to this topic

#1 strike

strike

    life is fragile, temporary, and precious

  • Members
  • Real Name:Olórin

Posted 30 January 2014 - 11:44 AM

I have a question which I would really appreciate a solution to.

 

Is it possible to have three flags on one tile as you enter the screen? I'm trying to get three wand shooters to spawn on the same tile. Is it possible through layers? I tried Free Form Combos and it didn't work.

 

Help is appreciated! :)

 

-Strike



#2 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 30 January 2014 - 12:01 PM

I wonder if it's possible to manually move the NPCs onto the tile via an FFC script at screen init.

I'm really not sure if there's a way to have three NPCs spawn on the same combo at screen init.

It would be possible to combo cycle a combo to a new combo that has the third enemy spawn flag on it and maybe even have the enemies arrive at different times on-screen, but that's the extent to my horrific imagination.

#3 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 30 January 2014 - 12:40 PM

ffc script MoveShooters{
    void run(int x, int y){
        Waitframes(4);
        for (int i = 1; i <= Screen->NumNPCs(); i++) {
            npc enemy = Screen->LoadNPC(i);
            if ( enemy->Type == NPCT_PROJECTILE ) {
                enemy->X = x;
                enemy->Y = y;
            }
        }
    }
}
This should move all shooters on screen to the position D0 (for X) and D1 (for Y). It is untested, so it might as well not work. I hope it does, though :)
  • ShadowTiger likes this

#4 strike

strike

    life is fragile, temporary, and precious

  • Members
  • Real Name:Olórin

Posted 30 January 2014 - 12:56 PM

Someone wrote a script for me and I didn't even ask. :love:

 

Sadly though there are other shooters on the screen which I do not want to spawn on that tile. :(

 

Let me give the whole context of the situation:

 

I have two Aquamentuses on a screen which I want to always spawn together. I also have 4 statues which shoot magic. The problem is that if you kill one Aquementus, leave, and kill the other Aquementus than one of the statues stops shooting magic. This is because I have the Aquemenuses in the first two enemy slots and the shooters in the last ones. The situation wouldn't be so bad but the shooters are necessary to kill the Aquementuses (you don't have a sword and you have to push mirrors around to reflect the magic at the monsters heads :tard: ). My solution was to add two shooters to the enemy page so that there would always be at least four shooters. The problem is that currently one of them spawns out of a statue which  doesn't work.

 

Help?

 

-Strike


Edited by strike, 30 January 2014 - 12:57 PM.


#5 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 30 January 2014 - 01:10 PM

Yeah I like to use my scripting knowledge to help people out with their ZQuest problems that would otherwise need complicated workarounds :)

So anyways, in that case, this here should do the trick. Do not place the shooters manually, but use this script to spawn them instead.
 

ffc script EnemySpawner{
    void run(int enemyID){
        Waitframes(4);
        npc enemy=CreateNPCAt(enemyID, this->X, this->Y);
    }
}

This script makes enemy # D0 appear at where you position the FFC. Place one of them on each statue. Again, this is untested.

 

Edit: Fixed script.


Edited by Avataro, 24 September 2015 - 06:23 AM.


#6 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 30 January 2014 - 01:11 PM

Idea. Dunno if it'll work. I noticed that Shooter type enemies aren't classified as "Doesn't count as beatable enemy" in the enemy editor flags. What if you checked that flag for all shooter enemies, then placed the shooter enemies on the top of the enemy list?

#7 Aevin

Aevin

  • Members
  • Pronouns:He / Him
  • Location:Oregon

Posted 30 January 2014 - 04:35 PM

Would it work if you made the tile a statue type, then had an inherent flag and a placed flag on the same tile? Shooters actually don't count as beatable enemies no matter what you check in the editor, so as long as they're before the Aquamentus on the enemy list, they should always return no matter what.

 

And, of course, you wouldn't need to manually place the enemy for the statue. Just use the screen flag.  Also ... is this a dungeon boss? If so, you can use "enemies always return" in conjunction with the dungeon boss screen flag, and the battle would reset every time you exited the room until you killed both of the Aquamentus, (the only beatable enemies).

 

I'm not positive that will all work for you, but outside of a script those seem like the best options to me.


Edited by Aevin, 30 January 2014 - 04:40 PM.


#8 strike

strike

    life is fragile, temporary, and precious

  • Members
  • Real Name:Olórin

Posted 01 February 2014 - 09:17 AM

Sorry, I couldn't use ZQuest for a while. The script works but it turns out it doesn't matter. If you kill one Aquementus and leave one shooter will exit every time no matter how many shooters you have so the original question is pointless. Aevin, is there a screen flag for enemies always returning? I don't want the quest rule checked... It also isn't a boss. Is there anyway to get it to work?

 

The help has been really appreciated. :)

 

-Strike



I'm such an idiot. How did I never know that quest rule existed? :doh:

 

Thanks for all the help! I really appreciate the help! :) I really like how this room is shaping up.

 

-Strike



#9 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 01 February 2014 - 09:22 AM

If you put the shooters before the regular enemies in your enemy list they won't disappear. So you don't actually have to use the enemies always return screen flag, but since aquamentus are boss enemies anyways it probably doesn't matter.



#10 Aevin

Aevin

  • Members
  • Pronouns:He / Him
  • Location:Oregon

Posted 01 February 2014 - 04:47 PM

Yeah, if they aren't bosses then you shouldn't check the enemies return screen flag. The only difference will be if you kill only one Aquamentus it won't come back if you exit or die. Like Moosh said, it should still work without the flag.

 

But yes, there's a screen flag for "enemies always return," so you can do it on a screen by screen basis.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users