heyllo,
so i just started scripting today so im new to everything. so i have a few questions.
1. what is a string&? example from engine scripts: int GetSwingDoorState(string& asName). that term is in every code and i don't know what it is.
2. how do i add text to a locked swing door? i have the stuff written out in the extra_english.lang but how do i apply it to the game? and also, how to i equip an object to a swing door so that whe the object is used on it the door becomes unlocked?
thank yall
also, what is a floating object? or what does "float object" do? example: float RandFloat(float afMin, float afMax);
(This post was last modified: 12-22-2013, 09:20 PM by MrJackrabbit.)
alrightt. so i tried it and it didnt work. what am i doing wrong? the level editor stuff, the extra_english.lang and map.hps and the error i recieved are below.
(12-23-2013, 12:21 AM)MrJackrabbit Wrote:
(12-23-2013, 12:11 AM)Kullin Wrote:
(12-23-2013, 12:01 AM)MrJackrabbit Wrote:
(12-22-2013, 11:30 PM)Kullin Wrote: 1. The string& mean that the name has to be in ""
alrightt. so i tried it and it didnt work. what am i doing wrong? the level editor stuff, the extra_english.lang and map.hps and the error i recieved are below.
heres the other level editor one
(This post was last modified: 12-23-2013, 12:30 AM by MrJackrabbit.)
Your lang file is good. Above this text but in the same post is the script. You did put the PlayerInteractCallback function in the door properties in the Level Editor right?
EDIT: It only takes one error in the lang file for the whole lang file to get broken. If the lang file is broken, NO error messages WILL APPEAR. You can't see your description IF you had one.
"Veni, vidi, vici." "I came, I saw, I conquered."
(This post was last modified: 12-23-2013, 01:30 AM by PutraenusAlivius.)
Your lang file is good. Above this text but in the same post is the script. You did put the PlayerInteractCallback function in the door properties in the Level Editor right?
EDIT: It only takes one error in the lang file for the whole lang file to get broken. If the lang file is broken, NO error messages WILL APPEAR. You can't see your description IF you had one.
yea i did thatt. ohhh i think i put the void DoorLocked thing in the wrong place. ill omve that to OnStart and see if it works.
Your lang file is good. Above this text but in the same post is the script. You did put the PlayerInteractCallback function in the door properties in the Level Editor right?
EDIT: It only takes one error in the lang file for the whole lang file to get broken. If the lang file is broken, NO error messages WILL APPEAR. You can't see your description IF you had one.
yea i did thatt. ohhh i think i put the void DoorLocked thing in the wrong place. ill omve that to OnStart and see if it works.
welllll it didn't work
(This post was last modified: 12-23-2013, 01:37 AM by MrJackrabbit.)
BEFORE trying the scripting suggestion below in the spoiler...
Your script has opening brackets instead of braces in the OnStart(), OnEnter() and OnLeave() routines. Anytime you make events occur within a routine, you'll need braces, and not brackets. Try this