E.g. object customer is created and is happy, object happy is created and will follow above the customer. Same goes for sad.
- I use a controller to set a variable(customer) to each customer object created.
- Then I used the "with customer" function to choose between happy or sad.
- put an "if" check to check if customer is happy or sad and to create the appropriate face. This is set to variable 'thought_bubble'.
- I placed another "with thought_bubble" function within the "with customer" to make it follow customer.
This is what I attempted to do... But I could only get the face to appear, but not to follow the customers which would be moving across the game-space.
if instance_number(obj_customer_1) < 15
customer = instance_create( 959, random_range(128, 448), obj_customer_1)
preference = irandom_range(1,4)
if preference = 1
preference_bubble = instance_create( controller_customer.customer.x - 25, controller_customer.customer.y - 25, obj_preference_restaurant)
x = controller_customer.customer.x - 25
y = controller_customer.customer.y - 25
alarm = choose(15,30,60,90)
Edited by BlaCkBlitZ, 13 June 2012 - 05:08 AM.