Thread

Object Change Help (Sdk)

Object Change Help // Sdk

1  |  

c.bello

Oct 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!

john

Oct 2, 2003, 9:17am
See my reply in bots, perhaps?

~John

[View Quote]

c.bello

Oct 2, 2003, 5:28pm
yes i did but i need a full tutorial.

john

Oct 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.bello

Oct 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.

john

Oct 3, 2003, 10:19am
Tell me exactly what ya needa n0 & i'll help ya ;)

~John

[View Quote]

c.bello

Oct 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.bello

Oct 4, 2003, 9:24pm
also, what is the exaxt code i should be using in that sub (sdk 1.0)

c.bello

Oct 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.bello

Oct 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

andras

Oct 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)

c.bello

Oct 4, 2003, 11:02pm
thanks andras, can anyone give me a VB example to help clarify that?

lord fett

Oct 4, 2003, 11:47pm
sdk.aw_object_change

obnum = sdk.aw_int(AW_OBJECT_NUMBER)

[View Quote]

c.bello

Oct 4, 2003, 11:56pm
where do i put that?

c.bello

Oct 4, 2003, 11:57pm
ah and thank lord fett i appreciate it, i am really getting close to
finishing this bot

c.bello

Oct 5, 2003, 2:12am
thank you all who helped me, i have this all down now, thanks again.

xelag

Oct 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]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn