Aller au contenu

Photo

CreateItemOnObject: Change appearance of an item?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
AmbrosiaPW

AmbrosiaPW
  • Members
  • 35 messages
Hello,

I have an NPC that hands out 5 delivery quests. I'd like each item to be delivered to look different. Do I have to make 5 different items or is there a way to dynamically change the appearance of an item?

The reason why I'm asking is I have 10 or more NPC's with 5 quests, and I'd like the items to be different but I don't think I should have to make 50 different items. Or do I?

I was hoping to have a list of the image resref's I wanted and pick one randomly when I create the item.


Thanks for your help! 

Modifié par AmbrosiaPW, 22 avril 2011 - 05:48 .


#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

AmbrosiaPW wrote...

I was hoping to have a list of the image resref's and pick one randomly when I create an item.


Thanks for your help! 


What you are asking to do is not a simple as you would think.  What you are really asking is to change the model for the Item. there is no way to change the model for the item.  The closest thing you can do is
Function - CopyItemAndModify
 an already exsisting instance of an item.

Modifié par Lightfoot8, 22 avril 2011 - 05:52 .


#3
AmbrosiaPW

AmbrosiaPW
  • Members
  • 35 messages
You are the man! Thank you so much. I mean I do lots of research trying to find these things but it's tough sometimes finding the function to do what I want. I figure most of the time if it isn't easy I'm going about it the wrong way. I'm just having fun though.

I'd think if I can change the appearance of an item with this Function, then I could easily do a random roll and grab a random image resref from a list. Is it not that simple?

#4
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

AmbrosiaPW wrote...

You are the man! Thank you so much. I mean I do lots of research trying to find these things but it's tough sometimes finding the function to do what I want. I figure most of the time if it isn't easy I'm going about it the wrong way. I'm just having fun though.

I'd think if I can change the appearance of an item with this Function, then I could easily do a random roll and grab a random image resref from a list. Is it not that simple?



Yes and No.   Yes it is that simple,  But it is not that simple to generate a valid random index number.  The real problem is that the model numbers do not have to be sequental, So you will have to figure out a way to scan through the models to see which ones are valid and which are invalid.   For a better understanding you may want to look at section 4 in: Documentation: Item Format

#5
AmbrosiaPW

AmbrosiaPW
  • Members
  • 35 messages
Cool thanks. yes after testing it I see what you mean. I guess I can store the index numbers I like.

I'm loving this! It's doing exactly what I want it to! Thank you!!:wizard:

Modifié par AmbrosiaPW, 22 avril 2011 - 07:28 .