Jump to content

Photo

If EX3 Button is pressed IT_KILLALLENEMIES is at x and y 12


  • Please log in to reply
1 reply to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 26 August 2020 - 11:48 AM

III in Roman Language means 3 (three).



II in Roman Language means two (2).



It is true that numeral means number.



RPGs stands for Role Playing Games



RPG stands for Role Playing Game



I have been making a Zelda Classic quest named Gobli's Adventure III which is named after both a Zelda Classic quest I made named Gobli's Adventure II and also Gobli's Adventure for PlayStation 1 in RPG Maker.



Anyways will (please post exact coding if I am wrong, thank you)
if (Link->PressEX3)
{
  Link->CreateItemAt(IT_KILLALLENEMIES,12,12);
work or no?



I am attempting to code an easy kill all killable enemies cheat in Gobli's Adventure III is why I am asking about up above code.

#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 27 August 2020 - 01:31 PM


Anyways will (please post exact coding if I am wrong, thank you)

if (Link->PressEX3)
{
  Link->CreateItemAt(IT_KILLALLENEMIES,12,12);
work or no?



I am attempting to code an easy kill all killable enemies cheat in Gobli's Adventure III is why I am asking about up above code.

 

 

 

No, you want one of the following:

 

if (Link->PressEX3)
{
    item i = CreateItemAt(I_KILLALL,12,12); //CreateItemAt is a frunction from <std> that calls Screen->CreateItem, and sets the position.
}

 

or

 

if (Link->PressEX3)
{
    item i = Screen->CreateItem(I_KILLALL);
    i->X = 12;
    i->Y = 12;
}

 

The code above expects that the KillAll item is item ID 62, the default value. If this has changed, then you can do something like this:

 

if (Link->PressEX3)
{
    int tmpid = -1;
    
    // Find the ID of an item with the class Kill All Enemies
    for ( int q = 0; q < 512; ++q )
    {
        itemdata id = Game->LoadItemData(q);
        if ( id->Family == IC_KILLALL )
        {
            tmpid = q; break;
        }
    }
    // If it exists, create it:
    if ( tmpid > -1 )
    {
        item i = Screen->CreateItem(tmpid);
        i->X = 12;
        i->Y = 12;
    }
}



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users