ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Object Change Help (Sdk)
Object Change Help // Sdkc.belloOct 2, 2003, 12:08am
Hey all, I need some serious help with making a bot to change objects on
button clicks, anyone that can help me out please let me know! johnOct 2, 2003, 7:18pm
A thank u for providing help wud have been nice... even if u needed more
help :-S ~John [View Quote] c.belloOct 2, 2003, 8:58pm
LOL, im sorry man thanks but it did not assist me any, I am really trying to
get this bot done and no one seems to be able to sit down and show me what to do. c.belloOct 4, 2003, 9:23pm
I am fairly new to programming and i need to know how to make the click of a
button activate an object change, Do i make the button and then double click it and put the code in that sub for an obejct change and thats all? c.belloOct 4, 2003, 9:42pm
oh and 2 more things lol, how can i either keep the object that is changed,
object number or how do i let the bot know the new one, and the things that i dont want to change like description do i even need that line? or the X Z .... c.belloOct 4, 2003, 10:15pm
ok good news, i go the bot to change an object, however i need to be able to
do it again, so i need to know how to to auto replace the object number andrasOct 4, 2003, 10:52pm
[View Quote]
> ok good news, i go the bot to change an object, however i need to be able to
> do it again, so i need to know how to to auto replace the object number > > After the successful aw_object_change you can interrogate the AW_OBJECT_NUMBER value which contains the new object number. Sorry - I can't give you example in VB but in C it looks like: rc=aw_object_change(); if (!rc) // success { yourobjectnumberholdervariable=aw_int(AW_OBJECT_NUMBER); } HTH -- Andras "It's MY computer" (tm Steve Gibson) lord fettOct 4, 2003, 11:47pm
c.belloOct 4, 2003, 11:57pm
ah and thank lord fett i appreciate it, i am really getting close to
finishing this bot xelagOct 26, 2003, 3:11pm
Well actually, it is the aw sdk that assigns the new object number to
the object before it sends the object add or change command to the world server. the rc == 0 (or !rc) in rc=aw_object_change(); does not garantee that the change will happen, it only says "yes, i can send this object change to the world, because i'm logged in and have permission". If the world server accepts the change, the object number becomes valid; if not (like because the cell is full), it is invalid. So it is good practice to wait until the callback object_result is triggered to make sure that your object change (or add) has been accepted by the world server, and that your new object number is valid. You can retrieve in that callback "rc" and aw_int(AW_OBJECT_NUMBER) , i.e. the new object number you got earlier so you can compare them. If "rc" equals zero, you succeded in making the change. Alex [View Quote] [View Quote] |