Page 1 of 1
Toolset problems
Posted: Mon Aug 18, 2003 10:31 pm
by Nighthawk4
I am trying to teach myself how to use the Toolset. At the moment I have two main problem scripts, one of which I have seen elsewhere. However, I can't get them to work correctly.
-----------
1) When a new character joins the module, all items are stripped and then certain items, plus some Gold and a level up are granted instead. The second part I can do successfully. However, I have seen this on another PW, where everything just goes at once. How is this done?
When I try it, I have a loop which gets the next item in the inventory and destroys it. This continues until the next item is not valid. All equipped items are unequipped first.
The problems are that this takes some time to complete and only loops about four or five times. So I have to use several triggers to repeat it, in order to ensure that everything is removed.
I did try using a check that the weight was zero before allowing the character to proceed, but one of the Avlis HAKs removes the GetWeight script - I don't see why.
----------
2) I want an NPC or an animal to patrol in a circle (not an exact circle, but a loop). However, when I select all of the Waypoints, it does not let me select the first one again to complete the loop. Therefore, the NPC or animal walks along the track, turns and walks back again.
Any ideas please?
Posted: Mon Aug 18, 2003 10:34 pm
by Actually
Ask JollyOrc what his results on the second one were. He was working on it.
I still say you could place the final waypoint right on top of the first one, then use a JumpTo command to restart the waypoint cycle w/o any noticable sprite flicker related to the teleport.
But I could be wrong.
Bye Now,
Jerry Cornelis - Could be wrong.
Posted: Mon Aug 18, 2003 10:36 pm
by Neve
For the first part, you could try something like this :
Code: Select all
void GetEquipped(object oPlayer, int sSlot){
object oItem;
if(GetIsObjectValid(GetItemInSlot(sSlot, oPlayer))==TRUE){
oItem = GetItemInSlot(sSlot, oPlayer);
if(!GetPlotFlag(oItem)) DestroyItem(oItem));
}
}
void main()
{
object oPC = GetEnteringObject();
object oMyItem = GetFirstItemInInventory(oPC);
GetEquipped(oPC, INVENTORY_SLOT_ARMS );
GetEquipped(oPC, INVENTORY_SLOT_ARROWS );
GetEquipped(oPC, INVENTORY_SLOT_BELT );
GetEquipped(oPC, INVENTORY_SLOT_BOLTS );
GetEquipped(oPC, INVENTORY_SLOT_BOOTS );
GetEquipped(oPC, INVENTORY_SLOT_BULLETS );
GetEquipped(oPC, INVENTORY_SLOT_CARMOUR );
GetEquipped(oPC, INVENTORY_SLOT_CHEST );
GetEquipped(oPC, INVENTORY_SLOT_CLOAK );
GetEquipped(oPC, INVENTORY_SLOT_CWEAPON_B);
GetEquipped(oPC, INVENTORY_SLOT_CWEAPON_L);
GetEquipped(oPC, INVENTORY_SLOT_CWEAPON_R);
GetEquipped(oPC, INVENTORY_SLOT_HEAD );
GetEquipped(oPC, INVENTORY_SLOT_LEFTHAND );
GetEquipped(oPC, INVENTORY_SLOT_LEFTRING );
GetEquipped(oPC, INVENTORY_SLOT_NECK );
GetEquipped(oPC, INVENTORY_SLOT_RIGHTHAND);
GetEquipped(oPC, INVENTORY_SLOT_RIGHTRING);
while(GetIsObjectValid(oMyItem)){
DestroyObject(oMyItem);
oMyItem = GetNextItemInInventory(oPC);
}
}
The second part... I think there has been a similiar post in which someone else suggested to teleport the creature to the first waypoint, just after it reached the last one. the first and last waypoint should be on top of eachother...
Posted: Tue Aug 19, 2003 12:56 am
by 4x4_Ender
Im very new to the toolset and im just finishing up designing my house for my character. I just had one question that im sure has been answered somewhere, but i cant seem to find it:
I put invisible objects on the crappy tileset chairs that you cant modify (because they come with the tile) in order to make someone able to sit in them by adding the sitdown script to "onused". But, i noticed when i tested them that you always face east when a PC sits down in them no matter how you orient the placable. Anyone have a fix for this?? Or can it not be done??
Posted: Tue Aug 19, 2003 2:33 am
by Jordicus
It has to do with making sure the invisible onject actually rests on the ground. If it is off the ground at all, there are facing issues.
Posted: Tue Aug 19, 2003 3:19 am
by Reinstag
Jordicus wrote:It has to do with making sure the invisible onject actually rests on the ground. If it is off the ground at all, there are facing issues.
Yeah, what he said. Same goes for placable stools. Got to drop the invis object below them and add the sitdown script to it. Otherwise your stools face people east.
Posted: Tue Aug 19, 2003 3:25 am
by Olaf
Reinstag wrote:Jordicus wrote:It has to do with making sure the invisible onject actually rests on the ground. If it is off the ground at all, there are facing issues.
Yeah, what he said. Same goes for placable stools. Got to drop the invis object below them and add the sitdown script to it. Otherwise your stools face people east.
Damn it.. your quote is going to bother me.. until its.. no longer the flavor of the month... reinstag.. lol
*hums the pirate song*
Posted: Tue Aug 19, 2003 3:30 am
by Reinstag
Olaf wrote:Damn it.. your quote is going to bother me.. until its.. no longer the flavor of the month... reinstag.. lol
*hums the pirate song*
Love the pirate song!
Posted: Tue Aug 19, 2003 4:18 am
by Fuzz
Reinstag wrote:Jordicus wrote:It has to do with making sure the invisible onject actually rests on the ground. If it is off the ground at all, there are facing issues.
Yeah, what he said. Same goes for placable stools. Got to drop the invis object below them and add the sitdown script to it. Otherwise your stools face people east.
Which is why the stools in most inns in avlis all face east.
Posted: Tue Aug 19, 2003 11:55 am
by Jordicus
which is why I alwys use chairs instead of stools...

Posted: Tue Aug 19, 2003 7:47 pm
by SlicerDicer
the only stool i use is in the shitter room!

hope thats the same with you guys hate to see ya shittin in a chair