Bioware Archive
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
DKIM Added to mail server - to improve email activation.
Home
Help
Login
Register
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Sit on object script
« previous
next »
Print
Pages: [
1
]
Author
Topic: Sit on object script (Read 303 times)
Legacy_Starbridge
Jr. Member
Posts: 57
Karma: +0/-0
Sit on object script
«
on:
January 14, 2011, 04:16:40 pm »
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")));
}
Logged
Legacy_Starbridge
Jr. Member
Posts: 57
Karma: +0/-0
Sit on object script
«
Reply #1 on:
January 14, 2011, 04:42:10 pm »
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")));
}
Logged
Legacy_kalbaern
Hero Member
Posts: 1531
Karma: +0/-0
Sit on object script
«
Reply #2 on:
January 14, 2011, 05:11:07 pm »
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.
Logged
Print
Pages: [
1
]
« previous
next »
Bioware Archive
»
Bioware Archive V2
»
Builders - Scripting
»
Sit on object script