(01-10-2011, 11:59 PM)house Wrote: [ -> ]Heres the code:
Code:
if(HasItem("NAME OF ITEM") == true) {
Bla Bla Stuff Here
}
Example:
Code:
void OnStart()
{
if(HasItem("cutter_1") == true) {
bla bla
}
}
Thank you. Is that the correct way to do it? I did something else to make it work, but I aint sure if it's the correct one. I did it like this:
Code:
void OnStart()
{
SetEntityCallbackFunc("Storage_Key","PickUpKeyStorage");
}
then the PickUpKeyStorage function:
Code:
//Pick up storage key
void PickUpKeyStorage(string& asName, string& asCallback)
{
AddDebugMessage("Picked up the Storage Key.", false);
}
It surely works perfect, but is it correct? :p
Thanks!
I think this thread should be stickied. Great source of info :
Agreed, what the above post said.
(01-11-2011, 02:37 PM)Tony32 Wrote: [ -> ]Code:
void OnStart()
{
SetEntityCallbackFunc("Storage_Key","PickUpKeyStorage");
}
then the PickUpKeyStorage function:
Code:
//Pick up storage key
void PickUpKeyStorage(string& asName, string& asCallback)
{
AddDebugMessage("Picked up the Storage Key.", false);
}
It surely works perfect, but is it correct? :p
Thanks!
You could alternatively just write PickUpKeyStorage in the callback field of the key.
Is the creator of this thread still active on the forum?
Or else we might wanna recreate the thread so it can be edited.
(01-15-2011, 06:25 PM)Akumasama Wrote: [ -> ]Is the creator of this thread still active on the forum?
Or else we might wanna recreate the thread so it can be edited.
Currently doing this, would you mind making the 2nd post? If we have a character limit on this forum we might need a 2nd post.
Do you mean that I make the second post on the topic or...?
If so, tell me when you're going to make it so I can post quickly
And I'll be on everyday to check for new stuff ofcourse.
How about something for those of us that don't know heads or tails about programming, and don't even wanna try to learn?
(01-21-2011, 11:45 PM)Ianlis Wrote: [ -> ]How about something for those of us that don't know heads or tails about programming, and don't even wanna try to learn?
They don't deserve to make levels.
Or any other kind of game that needs scripting/coding to make something.