(10-20-2010, 02:20 PM)Frontcannon Wrote: Some simple functions covering the basics for the people being completely new to scripting?
Let's see what I can find..
What it does: AddUseItemCallback - calls a function when an item is used on an entity R01_Key1 - the item used, in this case our key mansion_1 - the entity the key is used on, the normal mansion door KeyOnDoor - the function the callback calls (true means to remove it when called once)
SetSwingDoorLocked - locks/unlocks a door, false means to set it NOT locked, and the true is to wether use effects or not PlaySoundAtEntity - plays a sound at an entity, in this case the "unlocked a door"- sound at mansion_1, our door, the float value is the time it takes to fade in and the true is some strange boolean
this one doesnt work. I tried to place it onto my script but it gave me an error...
but its telling me that this : void KeyOnDoor(string &in asItem, string &in asEntity)
is the problem.
(This post was last modified: 03-18-2012, 06:04 PM by mrscoomich.)
(10-20-2010, 02:20 PM)Frontcannon Wrote: Some simple functions covering the basics for the people being completely new to scripting?
Let's see what I can find..
What it does: AddUseItemCallback - calls a function when an item is used on an entity R01_Key1 - the item used, in this case our key mansion_1 - the entity the key is used on, the normal mansion door KeyOnDoor - the function the callback calls (true means to remove it when called once)
SetSwingDoorLocked - locks/unlocks a door, false means to set it NOT locked, and the true is to wether use effects or not PlaySoundAtEntity - plays a sound at an entity, in this case the "unlocked a door"- sound at mansion_1, our door, the float value is the time it takes to fade in and the true is some strange boolean
this one doesnt work. I tried to place it onto my script but it gave me an error...
but its telling me that this : void KeyOnDoor(string &in asItem, string &in asEntity)
is the problem.
(10-20-2010, 02:20 PM)Frontcannon Wrote: Some simple functions covering the basics for the people being completely new to scripting?
Let's see what I can find..
What it does: AddUseItemCallback - calls a function when an item is used on an entity R01_Key1 - the item used, in this case our key mansion_1 - the entity the key is used on, the normal mansion door KeyOnDoor - the function the callback calls (true means to remove it when called once)
SetSwingDoorLocked - locks/unlocks a door, false means to set it NOT locked, and the true is to wether use effects or not PlaySoundAtEntity - plays a sound at an entity, in this case the "unlocked a door"- sound at mansion_1, our door, the float value is the time it takes to fade in and the true is some strange boolean
this one doesnt work. I tried to place it onto my script but it gave me an error...
but its telling me that this : void KeyOnDoor(string &in asItem, string &in asEntity)
is the problem.
When I copy and paste that (replacing the examples with my entity/ door names),
it says Error( a number, a number)
and when I stare back at my .hps file, it seems that the error told me it was the line where the
void KeyOnDoor(string &in asItem, string &in asEntity)
was placed. i've tried to fix this a couple times and not sure if there is a typo or where to.
why doesnt it work?
(This post was last modified: 03-21-2012, 12:05 AM by mrscoomich.)