DysoForums Forum Index DysoForums
 
GalleryGallery   Donate to DysotopiaDonate   Dysotopia.com homepageDyso.com
SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStats   RegisterRegister 
 Login to check your private messagesLogin to check your private messages   LoginLogin 

ActionGiveItem() ?

 
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders
View previous topic :: View next topic :: Hide signatures  
Author Message
dreamin'
Hero


Joined: 11 Nov 2002
Posts: 625

Level: 22
XP
EXP: 51 / 59 EXP: 51 / 59 EXP: 51 / 59
 86%
PostPosted: Thu Jun 26, 2003 8:09 pm    Post subject: ActionGiveItem() ? Reply with quote

I've got a little problem with a script I'm working on:

I need to transfer items from one container to another, let's say from container oStart to oTarget.
Now, it's vital for the script that stackable items are kept on different stacks, meaning that if oTarget already has a stack of say 25 arrows of the vampire, and I add another stack of 25 arrows, the inventory should contain two stacks of 25 arrows instead of one stack of 50 arrows.
Those scripting commands that I tried didn't allow this, anyone have an idea how to accomplish that?
Back to top
View users profile Send private message
Shadowleaf
Hero


Joined: 14 Jan 2003
Posts: 634

Level: 23
XP
EXP: 1 / 65 EXP: 1 / 65 EXP: 1 / 65
 1%
PostPosted: Fri Jun 27, 2003 10:17 pm    Post subject: Reply with quote

heh sorry no one responded, it's too complicated to bother, at least thats why i havent responded.... well if u want a general idea of what to do type in the filter "stack" and look at the functions theres a partial answer to ur question. ill look into it more so expect another post form me
_________________
Glorin wrote:
Marine you are such a great guy, i hope you don't get hit by a truck one day!!
Back to top
View users profile Send private message Send email AIM Address MSN Messenger
dreamin'
Hero


Joined: 11 Nov 2002
Posts: 625

Level: 22
XP
EXP: 51 / 59 EXP: 51 / 59 EXP: 51 / 59
 86%
PostPosted: Sat Jun 28, 2003 1:41 am    Post subject: Reply with quote

Hmmm, it
s 4 am, and I'm just coming from our universities summer festival, but you're right, there's a function SetItemStackSize(), maybe that should work
Back to top
View users profile Send private message
Shadowleaf
Hero


Joined: 14 Jan 2003
Posts: 634

Level: 23
XP
EXP: 1 / 65 EXP: 1 / 65 EXP: 1 / 65
 1%
PostPosted: Sat Jun 28, 2003 4:09 am    Post subject: Reply with quote

also,

GetNumStackedItems()

and

GetItemStackSize()

hmm.... they seem to be the same thing lol but anyway, you could try to split it but doing something like...

int nSplitSize = GetItemStackSize(oItem)/2;

then

SetItemStackSize(oItem, nSplitSize);

then yo ucreate the item in the otehr chest and set the stack size to nSplitSize. pretty simple huh?
_________________
Glorin wrote:
Marine you are such a great guy, i hope you don't get hit by a truck one day!!
Back to top
View users profile Send private message Send email AIM Address MSN Messenger
dreamin'
Hero


Joined: 11 Nov 2002
Posts: 625

Level: 22
XP
EXP: 51 / 59 EXP: 51 / 59 EXP: 51 / 59
 86%
PostPosted: Sat Jun 28, 2003 10:31 am    Post subject: Reply with quote

nah, that's not the problem... I can create the items in the right stacksize just fine. The question is wether or not setitemstacksize() will prevent the aumatical stacking of the items if I already have identical arrows/bullets... in that container. I'll just have to try it i guess

Edit: tested, doesn't work, setitemstacksize does not prevent further stacking icon_confused.gif
Back to top
View users profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.2 © 2001, 2002 phpBB Group