Strife QuestItems

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia
Contact:

Strife QuestItems

Post by Sir_Alien »

Below, I have aligned the inventory name of some Strife inventory tokens with their respective mobj information (what I'm particularly interested in is the Mobj ID of each item). Can anyone tell me if this information is accurate? Is there already a similar list that I'm missing?

Code: Select all

Inventory Name: Mobj Information

--------------------------------------------------------


QuestItem1: Mobj Name = MT_TOKEN_QUEST1, Mobj ID = 312

QuestItem2: Mobj Name = MT_TOKEN_QUEST2, Mobj ID = 313

QuestItem3: Mobj Name = MT_TOKEN_QUEST3, Mobj ID = 314

QuestItem4: Mobj Name = MT_TOKEN_QUEST4, Mobj ID = 315

QuestItem5: Mobj Name = MT_TOKEN_QUEST5, Mobj ID = 316

QuestItem6: Mobj Name = MT_TOKEN_QUEST6, Mobj ID = 317

QuestItem7: Mobj Name = MT_TOKEN_QUEST7, Mobj ID = 318

QuestItem8: Mobj Name = MT_TOKEN_QUEST8, Mobj ID = 319

QuestItem9: Mobj Name = MT_TOKEN_QUEST9, Mobj ID = 320

QuestItem10: Mobj Name = MT_TOKEN_QUEST10, Mobj ID = 321

QuestItem11: Mobj Name = MT_TOKEN_QUEST11, Mobj ID = 322

QuestItem12: Mobj Name = MT_TOKEN_QUEST12, Mobj ID = 323

QuestItem13: Mobj Name = MT_TOKEN_QUEST13, Mobj ID = 324

QuestItem14: Mobj Name = MT_TOKEN_CRYSTAL, Mobj ID = 325

QuestItem15: Mobj Name = MT_TOKEN_QUEST15, Mobj ID = 326
Cheers.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The information is correct, although there are 31 quest items, not 15.
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

Graf Zahl wrote:The information is correct, although there are 31 quest items, not 15.
Cool, I knew that, thanks. I couldn't be bother writing out 31 of them. ;)

I'm now having problems with while loops. What I want to do is have a looping script running, checking for questitem9. When you don't have it, it does nothing. When you do have it, it teleports you somewhere.

I understand it to work like this:

Code: Select all

Script 998 (void)
{

    while (checkinventory("QuestItem9") == 0)
	
        {
	
            Delay(1);
	
        }
	
    Teleport(10);
    Delay(1);

}
How far off am I?
User avatar
solarsnowfall
Posts: 1581
Joined: Thu Jun 30, 2005 1:44 am

Post by solarsnowfall »

Try

Code: Select all

Script 998 (void)
{

    while (checkinventory("QuestItem9") == 0)
	
        {
	
                Teleport(10);
                Delay(1);    
       
        }
    
      Delay(1);	
      Restart;

}
EDIT: Or maybe...

Code: Select all

Script 998 (void)
{

    until (checkinventory("QuestItem9") == 0)
	
        {
	
                 Delay(1);    
                 Restart;
       
        }
    
      Teleport(10);
      Delay(1);	

}
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

Code: Select all

script 998 (void)
{
    if (CheckInventory ("QuestItem9"))
    {
        Teleport (10);
        terminate;
    }

    Delay (1);
    restart;
}
...should work.
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

Nope. I'm still tooling around with this one. I've tried many combinations and I can't get it to work. Would someone mind sending me a working example please?

EDIT: Here's a copy of the script. The commands which activate when you've got the shotgun never activate, even when you've been given a shotgun...

Code: Select all

Script 998 (void)

{

	Printbold (s: "Hey Ma, how bout some cookies?");
	If (checkinventory("Shotgun"))
		
	{
	
	delay(1);
	Printbold(s: "This aint over...");
	Terminate;
	
	}
	
	Else
	
	{
	
	delay(1);
	Printbold (s: "No Dice...");
	GiveInventory("Shotgun", 1);
	
	}

	Delay (35*3);
	Restart;
}
User avatar
Kaiser
Posts: 180
Joined: Thu Jul 15, 2004 8:21 am
Contact:

Post by Kaiser »

I am not completly sure how you want it, this is an example script being looped

Code: Select all

script 1 (void)
{
	while(1)
	{
	if(CheckInventory("SpecialItem"))
	{

                        //do stuff here
			ACS_Terminate(1, 0);
	}
		delay(1);
	}
}
here's a script without the looping (triggered etc)

Code: Select all

script 1 (void)
{
	if(CheckInventory("SpecialItem"))
	{

                        //do stuff here
	}
        else
        {
            //do other stuff here
       }
}
Either of these should work...

and in this case, try this:

Code: Select all

Script 998 (void)

{

   Printbold (s: "Hey Ma, how bout some cookies?");
   If (checkinventory("Shotgun"))
      
   {
   Printbold(s: "This aint over...");
   
   }
   
   else
   
   {
   Printbold (s: "No Dice...");
   GiveInventory("Shotgun", 1);
   
   }
}
You may only want to use restart and terminate if you are looping the script, otherwise from what I am seeing, this script is only triggered..
Locked

Return to “Editing (Archive)”