Quest expressions question

How do you use an expression to get a list of objects in game.pov.parent ?

I'm making a combat system for my game my game is going to use a random mob generator so I need an expression to retrieve a list of objects in the room.


I also need to get a list of objects in the player inventory.


For the inventory, use the ScopeInventoryfunction. For the room, ScopeVisibleNotHeld. You may find FilterByAttribute and FilterByType useful too, so you get just get the objects you want from the list (just weapons or just monsters). Then there is PickOneObject to randomly pick one object from the list.

// get all objects in room
l = ScopeVisibleNotHeld()
// filter out anything not of the monster type
l = FilterByType(l, "monster")
// pick one at random
foe = PickOneObject (l)

thank you!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums