If player View is...? (SOLVED)

Started by RetroJay, Thu 29/04/2010 03:57:49

Previous topic - Next topic

RetroJay

Hi all good peeps of AGS. ;D

I have searched for my answer but to no avail.

My question is. Is there any way that the player can change room whilst using a specific character view?
I wish to use something like - If PlayerView=(10) then change room at specific coords..Blah..Blah.

I have been trying various codes to achieve what I wish but am failing. :'(

The reason I am trying to do this is because the player can use an inventory item (clothing) and change view (clothes).
I then wish him to enter a diferent room to the one he would have gone to if he were wearing his normal clothes.

Please. Can anyone Help?

Many Thanks.
Jay.

Gilbert

If (player.View == 10) ...
should work.

Can you post the codes that you have tried here and let us see why they won't work?

Khris

Yes, player is a pointer variable that holds the current Character instance. Thus, every function or property that applies to Character will apply to player also.

Here's the full list:
http://www.adventuregamestudio.co.uk/manual/Character%20functions%20and%20properties.htm

RetroJay

Quote from: Gilbet V7000a on Thu 29/04/2010 04:31:06
If (player.View == 10) ...
should work.

Can you post the codes that you have tried here and let us see why they won't work?
Thank you Gilbet and, once again, Khris. ;)

That is exactly what I need.
Gilbet. Sorry I can't post my codes cos I deleted them when I found they didn't work.
However I nearly had it right. I just missed the extra equal sign. What is the purpose of this?

Many thanks.
Jay.

Khris

== is used for comparisons in conditional statements.

= is a command that sets the value of the variable on the left side to the term's value on the right side.

SMF spam blocked by CleanTalk