switch(ActionNum)
{
case 0: //Give
// The code for Give
break;
case 1: //Pickup
// Probably nothing, as this is clicking in the inventory, meaning you already picked it up
break;
case 2: //Use
switch(itemtype[ofst(a,0])
{
case 0: //Item type 0
// Your event for item type 0
break;
// make a case for each itemtype
}
break;
// make a case for each ActionNum
}
case 4: // I believe this was the look at number
strcpy(itemDescription.text, "Ew... this gum must be 60 years old");
break;
switch(itemType) // determines the type of item
{
case 0:
switch(ActionNum) // determines what to do with it
{
case 0:
break;
case 1:
break;
}
break;
case 1:
switch(ActionNum)
{
case 0:
break;
case 1:
break;
}
break;
}
switch(ActionNum)
{
case 1:
for (a=0; a<3; a++) // Change the max depending on max amount of items in Global Script
{
if (itemtype[ofst(a,0)]==0)
{
itemtype[ofst(a,0)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,1)]==0)
{
itemtype[ofst(a,1)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,2)]==0)
{
itemtype[ofst(a,2)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,3)]==0)
{
itemtype[ofst(a,3)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,4)]==0)
{
itemtype[ofst(a,4)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,5)]==0)
{
itemtype[ofst(a,5)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,6)]==0)
{
itemtype[ofst(a,6)]=1;
DestroyActor("Event Actor");
break;
}
else if (itemtype[ofst(a,7)]==0)
{
itemtype[ofst(a,7)]=1;
DestroyActor("Event Actor");
break;
}
else
{
CreateTimer("Event Actor", "a+", 20);
recycle=1;
}
}
break;
}
switch(itemtype[ofst(a,0)) // determines the type of item
{
case 0: // empty item
break;
case 1: // item 1
switch(ActionNum) // determines what to do with it
{
case 0:
// action 0 on item 1
break;
case 1:
// action 1 on item 1
break;
}
break;
case 2: // item 2
switch(ActionNum)
{
case 0:
break;
case 1:
break;
}
break;
// and so on
}
switch(itemtype[ofst(a,cloneindex)]) // determines the type of item
{
case 0: // empty item
// there is no item here as this signifies no item
break;
case 1: // item 1, apple
switch(ActionNum) // determines what action
{
case 0: // Give item
// I don't know what you will do with this, but I'll assume that you create the item actor and give it to the other actor
CreateActor("apple", "apple", "(none)", "(none)", 0, 0, false);
itemtype[ofst(a,cloneindex)]=0; // gets rid of item
break;
case 1: // pickup item
// this should be left blank, you can't pickup an item that is in your inventory
break;
case 2: // use
HP+=5; // apple's use is to increase hp
itemtype[ofst(a,cloneindex)]=0; // gets rid of item
break;
// include a case for each of your actions
}
break;
case 2: // item 2, sword
switch(ActionNum) // determines what action
{
case 0: // Give item
CreateActor("sword", "sword", "(none)", "(none)", 0, 0, false);
itemtype[ofst(a,cloneindex)]=0; // gets rid of item
break;
case 1: // pickup item
// this should be left blank, you can't pickup an item that is in your inventory
break;
case 2: // use
ChangeAnimation("player", "attack", FORWARD); // using sword will cause attack
break;
// include a case for each of your actions
}
break;
// and so on
}
Users browsing this forum: No registered users and 1 guest