Doors and spawning

For questions about using Classic.

Post » Sat Oct 30, 2010 10:30 am

Hey guys.

I've got a cap below where I'm trying to make two houses which you can enter. If you go into the one on the right and come back out, it puts you outside it, but if you go into the one on the left it goes back to the spawn, so I think I've done something wrong with the picking. Could anyone have a look? Is there a better way to do this?

[url:blpyw4ma]http://dl.dropbox.com/u/1378330/RPG_0002.cap[/url:blpyw4ma]
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Sat Oct 30, 2010 11:01 am

You need to change the condition in event 5 of the event sheet "Basic_Character":
[code:21pbmfff]+ System: Is global variable 'Spawn_Root' Equal to Door_Spawn.Value('PV_Spawn_Root')[/code:21pbmfff]
This looks correct, but it doesn't do any picking of the object "Door_Spawn", so what happens is the global is only compared to the first instance of "Door_Spawn".

The solution is to pretty much reverse the condition by comparing the "Door_Spawn" object's PV to the global:
[code:21pbmfff]+ Door_Spawn: Value 'PV_Spawn_Root' Equal to global('Spawn_Root')
[/code:21pbmfff]
This way the correct object is picked.
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests