Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved Wall script
Author Message
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #21
RE: Wall script
(03-07-2012 08:29 AM)flamez3 Wrote:  No. If you read it you would find out there are 5 parameters to meet:

asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used


Which comes to:

AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);
Yea but are'nt you suppose to switch out the asItem with the item you are going to use (which in this case is Hammer & Chipper) asEntity as the entity to use it on (Which in this case is cell_breakable_wall_1) asFunction is what to do...?? and the last 1 is just false or true... Or have I completely misunderstood everything here O.o

(This post was last modified: 03-07-2012 09:07 AM by Saren.)
03-07-2012 09:02 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #22
RE: Wall script
(03-07-2012 09:02 AM)Saren Wrote:  
(03-07-2012 08:29 AM)flamez3 Wrote:  No. If you read it you would find out there are 5 parameters to meet:

asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used


Which comes to:

AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);
Yea but are'nt you suppose to switch out the asItem with the item you are going to use (which in this case is Hammer & Chipper) asEntity as the entity to use it on (Which in this case is cell_breakable_wall_1) asFunction is what to do...?? and the last 1 is just false or true... Or have I completely misunderstood everything here O.o
You missed the internal name.

03-07-2012 09:19 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #23
RE: Wall script
(03-07-2012 09:19 AM)flamez3 Wrote:  
(03-07-2012 09:02 AM)Saren Wrote:  
(03-07-2012 08:29 AM)flamez3 Wrote:  
You missed the internal name.
Oh right... what's that?

03-07-2012 09:21 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #24
RE: Wall script
AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);


asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used

(This post was last modified: 03-07-2012 11:17 AM by flamez3.)
03-07-2012 11:17 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #25
RE: Wall script
(03-07-2012 11:17 AM)flamez3 Wrote:  AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);


asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used
I SAW THAT O.o... It just says... internal name... it dose'nt explain what it's used for or anything

03-07-2012 11:19 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,229
Joined: Jul 2011
Reputation: 215
Post: #26
RE: Wall script
It's for the name of the callback.

Tutorials: From Noob to Pro
03-07-2012 11:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #27
RE: Wall script
It doesn't have to be anything, you can just put ""

03-07-2012 11:32 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #28
RE: Wall script
(03-07-2012 11:32 AM)flamez3 Wrote:  It doesn't have to be anything, you can just put ""
Right so... why would I need it and plus,
(03-07-2012 11:23 AM)Your Computer Wrote:  It's for the name of the callback.
if it's just a name and you don't have to type anything.. how can my script be wrong....

(This post was last modified: 03-07-2012 12:04 PM by Saren.)
03-07-2012 11:57 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #29
RE: Wall script
You need to have the "" in there. Like this:

AddUseItemCallback("", "Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", true);


You need it cause that's how the function works.

03-07-2012 12:34 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #30
RE: Wall script
(03-07-2012 12:34 PM)flamez3 Wrote:  You need to have the "" in there. Like this:

AddUseItemCallback("", "Hammer & Chipper", "cell_breakable_wall_1", "BreakWall", true);


You need it cause that's how the function works.
So I need the "" things no matter what..... you know, it would have been a 100 times easier pointing that out from the start.... but uhm, I guess you wanted me to see it myself or.... something... dunno..... oh well, now I know.... thx.. lol

03-07-2012 02:47 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: