Hi again!
okay I am wondering something, I have this quest that the player needs to get n item out of a chest....is it possible to have like for example 8 chests and randomize in which one of the chests the item it should be in?
Hi again!
okay I am wondering something, I have this quest that the player needs to get n item out of a chest....is it possible to have like for example 8 chests and randomize in which one of the chests the item it should be in?
CreateItemOnObject("item_template", GetObjectByTag("ChestTag", Random(8)));
This is done before the player starts opening chests. It assumes there are 8 chests with the same tag. Random(8) returns an integer in the range 0-7, which is OK here, because GetObjectByTag numbers the instances as 0-7.
CreateItemOnObject("item_template", GetObjectByTag("ChestTag" +IntToString(Random(8))));
Hee hee, I'm doing something similar for a teleporter. 6 chairs in a room, one teleports you further along in the dungeon, the other 5 to "oh poop" situations, random which chair is the good one. Great for splitting up parties.
works like a charm thanks!! ![]()