Main Menu
  • Welcome to The RPG Maker Resource Kit.

Buying a house in the game Script

Started by Todne, January 05, 2006, 02:32:02 AM

0 Members and 1 Guest are viewing this topic.

Todne

I want to make it so that in certain towns you can buy houses to live in. I was wondering if anyone could make me a script.

ArkBennett

Lol, why?
Just use events, I'm using events to do that on my game Shigo.
Scripts doesn't neccessarly half to solve every problem.
On top of that note, it's not always that good to stuff your game w/ alot of scripts 'cause it makes it'll make it lag.

Dalton

Quote from: ArkBennettLol, why?
Just use events, I'm using events to do that on my game Shigo.
Scripts doesn't neccessarly half to solve every problem.
On top of that note, it's not always that good to stuff your game w/ alot of scripts 'cause it makes it'll make it lag.

Nice talking like me you pulled off there.

Anyway...

Ark is right, events will be useful.  Although if you have too many in the map it'll lag it up, but there is a script that lowers event lag!  Fear not!... Well I forget what it is, but what you want to do is easy with events, takes 5 minutes to start it up, an extra for each house.  Probably have hours of creation time on a script... maybe like 20~30.

blueXx

lol but you guys didn't explain him how to make it..
here is a short example:

using door events do:

if switch(owned) = off then
-message: would you like to buy the house for 5k?
-show choices: yes/no
-if yes
--if money >= 5000 then
---change money: -5000
---switch(owned) = on
--else
---message: bah you don't have enough :(
-if no
--message: maybe later?
else
-teleport (house)
holy shit my sig was big!

ArkBennett

Yeah I should've... My bad.
But Blue pretty much has it all.
See? That was so much more simpler than making a script.

torono9

but what about making furntiture items to put in and move around house
kinda like in animal crossing

modern algebra

You'd have to create furniture items first, and this might not be most efficient, but my initial thought would be to make a common event for each item, and have the item call its corresponding common event. Example: If you want a stool, then in the item tab on database, have a non-consumable item called "stool" which calls common event 'stool'. Now, make a switch "in house" which is turned on every time you enter house and turned off when you exit, as well make a switch called "stool drop". In the house, create an event called stool. Make it transparent, and check the box that says through. As well, make it's speed "Fastest" and it's Frequency "highest". Now, make a custom Move Route which is Repeat Action Move towards Player. Make a new event page in the same event. Have this one called by the switch: [Stool Drop], and make it's image a stool. Change it's speed to fast and it's frequency to high. Input this:

Text: Do you want to push it, pull it, pick it up, or leave it?
Show Choices: Push, Pull, Pick Up, Leave
When Push:
  Set Move Route Player (Ignore if Can't Move)
                 1 Step Forward
  Set Move Route [Stool] (Ignore if Can't Move)
                 Move toward Player
When Pull:
  Set Move Route Player (Ignore If Can't Move)
                 1 Step Back
  Set Move Route [Stool] (Ignore if Can't Move)
                 Move toward Player
When Pick Up:
  Control Switch: [Stool Drop] = OFF
  Change Items: [Stool] + 1
When Leave:
Branch End

Now, go to common events in the database, and define 'stool' to have a process similar to this:

Conditional Branch: Switch[in house] = ON
  Set Move Route [Stool]
                  Move Up
  Control Switch [Stool Drop] = ON
  Change Items [Stool], - 1
  Else
  Text: You cannot drop that here
Branch End


I haven't tested it, but it ought to work. Just post if you are having trouble. Note: If the item is not passable (a stool is), you will have to change the When [Push] to: Move Event: [Stool] move away from player, and put it before the Player Move.

:)

    
Buying a house in the game Script
« on: January 04, 2006, 06:32:02 PM »

^^^^^^^^^^
January....06....lol
Watch out for: HaloOfTheSun

Ruhani777

Guys, i think i have this home thing settled, ill be making a housing system, where as you could buy a home, then purchase furniture to go along with it. It'll be a good profit maker, sorta like real estate. Every piece of furniture you buy, the home's value will go up. I'll post a tutorial on how to make this housing system, so if you're interested, then let me know.

Irgna

Near Fantasica's Test Bed has a script in it that allows you to decorate a house. Check Creation Asylum if you want to check it out. It's a little buggy, though.
PROPERTY OF TEABAG!!! ALL HAIL TEABAG!!!

Kokowam

Quote from: Nouman on January 24, 2007, 05:22:14 AM
   
Buying a house in the game Script
« on: January 04, 2006, 06:32:02 PM »

^^^^^^^^^^
January....06....lol

To simply say pretty much what Nouman said a while back,

Re: Buying a house in the game Script
« on: January 24, 2007, 12:22:14 AM »

^^^^^^^^^^
January....January....lol

Well, still nice to know.

skn

#11
nvm self resolved