ZFGC

Resources => Coding => Topic started by: litium on June 26, 2006, 12:25:01 am

Title: [Request / Listing] House enter/exit script or example?
Post by: litium on June 26, 2006, 12:25:01 am
well i'm trying to make a code taht when links enter to a house a variable called global.house gets a value (a identifier to know where to links have to start when he exits)

but i cant figure out how to do the creation of link code, any help?
Title: Re: House enter/exit script or example?
Post by: Goodnight on June 26, 2006, 01:25:32 am
Do you create Link via code in each room? Or have you placed an instance of Link in each room? Or do you have a persistent Link?

Either way, you can do this in the Room Creation Code. In the House room's RCC, set global.house to whatever value means he's in the house.

Then in the Outside room's RCC, check if the variable equals that value, and if so, do either:
Code: [Select]
instance_create(x_pos, y_pos, objLink)If a Link doesn't already exist in that room, or:
Code: [Select]
objLink.x = x_pos
objLink.y = y_pos
If Link already exists or is persistent.

The x_pos and y_pos should be changed to the position you want Link to appear at.
Title: Re: House enter/exit script or example?
Post by: Retro on June 26, 2006, 12:16:45 pm
Lol Litium, don't want to use mine?  You can if you want lol.
Title: Re: House enter/exit script or example?
Post by: litium on June 26, 2006, 05:45:12 pm
i alredy figured it out, i make an object that creatres link using diferents values so if global.house_linkhouse=true link starts on thee xit of that house and if global.house_npchouse1=true starts on that exit
Title: Re: House enter/exit script or example?
Post by: crispy on June 26, 2006, 08:19:14 pm
Retro urs don't even work.
Title: Re: House enter/exit script or example?
Post by: mit on June 26, 2006, 10:33:28 pm
http://www.kousougames.co.uk/stuff/Overworld.zip

Yay.

Probably doesn't help anyone.

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved