You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Editing  \  Doors, stores, and scripts galore.....s

Back to Threads

Viewing Thread: Doors, stores, and scripts galore.....s

 

Dopewingduck

Joined: 18 July 2013
Posts: 19
19 July 2013 17:11 (UK time)

Ok so I needs two things:

1. Is there a way to make a door that is separate for the standard door? One with its own track and open sound.
2 If so, can you make said door require x amount of keys to open it? Also will it crash the game if I don't have enough key to open it like the standard door does?

A question similar to this one was posted along time ago but I don't think it was answered well enough. The idea is to make a pawn shop where I can buy a few items. The door goes in front the item and it looks like a sign that is green and says for sale. When you have enough money you can open the door to retrieve to item. The door track turns red and says sold and the door sound would be a cha-ching sound. What do you think?
We be moden'!


You need to login to create posts in this thread.

hirmuolio

Joined: 11 November 2008
Posts: 60
20 July 2013 11:32 (UK time)

Shouldn't be hard to do that.

When player touches the door sector run script to check ammount of item x player has. if player doesn't have enough items you can give message or make nothing happen. If player has enought items destroy/replace closed door sector with open door sector and play sound.

It should look something like this:

in map editor:
-create closed door sector and open door sector on top of each other (closed door sector on top)
-add "run door" to closed door sector trigger text

in sc file:

export door //this in the beginning of sc file

void door() //this runs when player touches our door sector
{
if(SC_GetItemCount("key item") >= x)
//checks if there are more than "x" ammount of item called key item
{
//this script runs if player has enough key items

SC_SetSectorHidden( int id of closed door, 1);
//this hides closed door sector revealing open door sector and allowing player to walk over it

SC_PlaySound( "location and name of sound effect");
//plays sound effect, location for file in sfx folder like "world\\thunder" for sund thunder
//in folder world

//if you are usimg money for buying acces ofc we want to take money away from player
//this takes x ammout of key items away from player
SC_GiveItem("key item",-x);
}

else//optional. This runs if player doesn't have enough items
{
//you could add here message saying player doesn't have enough money etc
SC_GameMessage("message goes here");
}
}


Looking how other maps do stuff and meteor 2 script command list helps alot.

It is I, Hirmuolio.


Edited: 20 July 2013 11:42


You need to login to create posts in this thread.

Dopewingduck

Joined: 18 July 2013
Posts: 19
20 July 2013 19:06 (UK time)

Ah, ok I see what you did. You're using hide sector as the door. That makes sense. Can this be done more than once within the same level? Like, if I wanted 3 items for sale for 3 different prices( door one cost 10, door 2 cost 20 and so on)

We be moden'!


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
20 July 2013 22:17 (UK time)

Wouldn't it be more simple to do using a toolbar? (see ravagers of time for an example)
Unless this door system is an intentional stylistic choice.


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.

Dopewingduck

Joined: 18 July 2013
Posts: 19
20 July 2013 22:50 (UK time)

Well honestly I'm not sure. On the one hand, the tool box looks more official and feels more in-game store like. But havering the items in-game with the player with the prices up on the wall feels more immersive. No explanation to the player needed. It's all there with no interruption. Plus with a little tricky sprite work, you can make it all look really good. I am a novice when it comes to script though. I can do single line in text box stuff, but the bigger more complex script I'm still trying to figure out. So I guess, in the end, it would come down to what's easier. Btw, I'm impressed with the amount of good and positive feed back I'm getting on this forum. This community is pretty awesome! :)
We be moden'!


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
21 July 2013 19:42 (UK time)

Here's a little idea that I was having: make it just like a toolbar shop, except that when you purchase something, it spawns an item dropping box object that you need to open in a room (maybe have it come out of somewhere with a conveyor belt!).
It sounds convoluted, but I think it'd feel kinda rewarding. :choc


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


Edited: 21 July 2013 19:46


You need to login to create posts in this thread.

Dopewingduck

Joined: 18 July 2013
Posts: 19
21 July 2013 20:14 (UK time)

That would be pretty cool. Like you walk into the shop and it would have a counter with a shop keeper behind it. You put the script right in front of the shop keeper. When you walk up the toolbox appears. You buy the item and you place the conveyer belt on the counter at the end of the wall so it slides off onto the counter right in front of you. It's like a gun vending machine. The only problem is the script for all of that. Ill need to do some research and get a little more familiar with script . Jeez it makes me go cross eyed sometimes.
We be moden'!


You need to login to create posts in this thread.

me_mantis

Joined: 26 September 2003
Posts: 1152
23 July 2013 18:20 (UK time)

just look at the bright side, you're learning stuff!

I'd say you should look at the RTSS script for placing AI objects, except place your fancy crate based on what gets clicked.

Also, feel free to copy any of my code. It's there to share!

Then give it 1 hp, and have it run over a tiny acid spot, so it opens up automatically. (maybe this wouldn't work, but it might be cool)

You need to login to create posts in this thread.

Dopewingduck

Joined: 18 July 2013
Posts: 19
23 July 2013 19:02 (UK time)

I should try RTSS. I saw it on meteormods but never got around to downloading it. I would love to study the scripting though. I need some real world examples. Since I'm at work and posting from my phone I can't do it now but, when I get off I think I'll post in announcements about my mod and tell all you good people what it's about. Spoilers: it's a zombie survival horror game (and I know zombies have been done to death and back) but I think I can bring in some fresh ideas to go along with it. Btw, how do I go about posting pictures on the forum?
We be moden'!


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
25 July 2013 06:59 (UK time)

You can't attach files till you have this trusted member rank thing.
But you can always post links to external image hosts.


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.

Dopewingduck

Joined: 18 July 2013
Posts: 19
26 July 2013 01:39 (UK time)

Ok, so I posted a presentation on my mod in meteor 2 announcements if you are interested.
We be moden'!


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use