Make a certain kind of objects and room names and game icon

Started by SGK, Wed 18/02/2004 22:55:13

Previous topic - Next topic

SGK

hi all im new and this is my first post so im sort of newbie.

well i have these questions:

1- how to make an object like a map thats in your inventory and you can see it anytime at all. ive done that using the map image as a room hiding the player characther and creating an area where anywhere you click it would go to a certain room. thats the trouble.
how to make that when you finish to see the "map" (that is a room) you go back to the place that you were before when you clicked the map object?

2- what are the possible room names? only roomXXX?

3- when you create a new game there a thing were you select the icon. how do i add more?

(an extra question)
4- how to make the keyboard usable in the game like a first player game where you shoot as a sniper like "6dayassassin" 8) ?

EDIT:wtf is this automatically editing to remove txt spelling?!
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Wolfgang Abenteuer

1) Where you have the character leave the room, try using
character[EGO].room = character[EGO].prevroom
If you haven't actually moved the character on the map screen at all, he will still retain his x,y coordinates from the first room, so that shouldn't be a problem.

2) Yup.  You can edit the room descriptions in the editor, but the filenames need to be roomxxx.crm

3) Hmm...never tried that.  Someone else will have to field that one for you. :)

4) You need to use on_key_press and assign a function to each arrow key's ASCII value.  I'm not sure exactly what you're trying to script so I really can't be any more specific than that ATM, but that's basically how you assign keyboard keys to do things within AGS.

5) I have always wondered that one myself! :P

~Wolfgang

NavyNuke04

Another option to you map question is to use Global Variables. Before taking the player to the map room, you could use this line:

SetGlobalInt(1,player.room); //sets global int 1 to the players current room
Then when you want the game to return to that room, you can use
NewRoom(GetGlobalInt(1)); //Returns to the room number that was saved in Global Int 1

Hope that helps...

Scummbuddy

3. are you talking about templates in the editor to select? or the actual game icon that you would find for the games executable?
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SGK

SCUMBUDDY: both of them i think i dont know hwat the template i meant the game icon, it makes it look more professional.

NAVYNUKE04: Thanks but im not much familiarized with scripting i only use functions in the interaction menu... where do i put that?

(ill read the manual of course) but you have to put this line in every room you go to?

Id like to do something like in "rodekill a day in life" where you can read the notes and wherever you are you go back as if you really have just read the note not transported to another room.

WOLFGANG: thanks! but im nt certain about the answer of question 1 where to put the script line.

Tahnks to all. :)
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Scummbuddy

i know youll be placing your own .ico file in your game file.  look in the help file for probably "custom icon" or "custom game icon" within its search function. there it should tell you where to put your icon and its naming conventions. Im not at home so im not able to give you a better place to look in the help file.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SGK

ok thanks ive found it.

But still theres a crucial thing: where to put that script things you all gave me!

like wofgandg said to put this:

character[EGO].room = character[EGO].prevroom

very useful, but  i put it where exactly and how i mean i want you to "look the map"(change room) then you click anywhere(ive sued a hotspot) and you return where you were before.
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

NavyNuke04

- how to make an object like a map thats in your inventory and you can see it anytime at all. ive done that using the map image as a room hiding the player characther and creating an area where anywhere you click it would go to a certain room. thats the trouble.
how to make that when you finish to see the "map" (that is a room) you go back to the place that you were before when you clicked the map object?

When you click the map in your inventory, use the SetGlobalInt(whatever,player.room); line before changing to the map room. When you get done with the map, and you want to go back to the previous room, use NewRoom(GetGlobalInt(whatever));

Are you familiar with scripting at all, or are you doing everything without scripting? If you are wanting to get more complex like this, you'll have to learn how to do scripting manually. It's simple really, just takes time to learn and perfect.

SGK

It worked! thanks! Ive used (for no reason) number 1 in the place of whatever, but id like to know what is the number one ive put?

im using variables in other places so id like to understand it.

and btw, whtas (int) ??
Perils of Poom rules! Therefore i want a sequel!

for the ones that finished 7days,check this;D

Wolfgang Abenteuer

When someone says "int", they're referring to a variable ("int" is actually short for "integer"), and the values of variables can be used in any number of things.

The "1" you've put is simply the GlobalInt you're using.  AGS currently supports up to 500 GlobalInts (numbered from 0 to 499), so you could have used NewRoom(GetGlobalInt(499)); and it would have worked, so long as you used SetGlobalInt(499, character[EGO].room); before.

In navynuke's example, if I'm reading it correctly, he has you set a GlobalInt to the value of the room you're currently in when you're using the map, and then when you're done with the map it returns you to the room number represented by the value of that GlobalInt.  Probably something like this:

//script for using the map:
SetGlobalInt(1,character[EGO].room);
--Sets the value of GlobalInt 1 to the room number of the current room

NewRoom(100);
--Goes to room 100, or whatever room the "map" is

//script for clicking anywhere on the map that doesn't teleport you to somewhere specific -- this would likely be hotspot 0:
NewRoom(GetGlobalInt(1));
--Goes to whatever room number is specified in the value of GlobalInt 1

Looking at it systematically, here's what happened:

•The player is in a room (we'll say room 10 for example), when he decides to use the map.
•As soon as the map is used, GlobalInt 1 is set to 10 (the current room number) and the map opens and teleports the player to the map room, in this case room 100.
•Once the player is on the map screen, he decides to return to the room he was in, rather than teleporting somewhere else.  He is returned to whichever room number is stored in GlobalInt 1 (10 in this case).

~Wolfgang

SMF spam blocked by CleanTalk