Ok, so I'm trying to make a bench to sit on. Used a generator and this is what it spit out, and its not working. Assistance please?
void main()
{
object oPC = GetClickingObject();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ActionSit(GetObjectByTag("bench001")));
}
Sit on object script
Débuté par
Starbridge
, janv. 14 2011 04:16
#1
Posté 14 janvier 2011 - 04:16
#2
Posté 14 janvier 2011 - 04:42
This ended up being the one that worked. Figured it out after I tinkered a little more.
//Put this script OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ActionSit(GetObjectByTag("bench001")));
}
//Put this script OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, ActionSit(GetObjectByTag("bench001")));
}
#3
Posté 14 janvier 2011 - 05:11
There's several premade scripts you can use already. "x0_o2_use_chair" is one of several. Just drop it into the OnUsed event of a chair, bench, etc... . I prefer to use it in an invisible placeable that I lay over chairs, couches, benches.





Retour en haut






