hi there. now, im totally new to this. im doing a simple little game. no real story, as i just want to get used to the scripting and placing of hotspots and objects. i have managed to create 4 rooms and can get to and from each 1 fine. i can look/interact etc with hotspots/objects and pick objects up. what i cant get my head around is what to to put in the script to get character to look at object before interacting with it. basically i have a ship with a closed panel housing a circuit board. i can open panel and take board with looking then interacting or i can just interact and do it without. i have got meself confused searching thru posts on here and cant seem to find what im looking for. can some1 either point me in right direction or explain what i need to input in my script.
many thanks
You could declare a boolean variable in the beginning of the room script:
bool LookedPanel = false;
After the script what happens after you look at the panel, enter:
LookedPanel = true;
Then check in the interaction command script, whether the variable checks as true or false:
if (LookedPanel == true) {
//Your script if player looked at panel before
} else {
// Your script if player didn’t look
}
perfect thank you. slowly getting there. had to do a few tweaks but with some trial and error i managed to get it how i wanted it. didnt help when i wanted to make a copy of my entire script, in case i messed it up, and instead of copying i hit delete. thank you again for ur help.
No problem, have a great time designing your game!