Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - jamesreg

#21
Ok, I have a global variable set called LibraryMode set by default to 0

I have a button called LibraryControls each time I click on the button I want it to change the number of the Global varable to something else.

I have done something wrong along the way because the first time you click it, It does indeed change from 0 to 1 like I want but each time I click it after that it does not change the numbers accordingly could someone help me figure out what im doing wrong.

Here is my code.
Code: ags
function LibraryMode_OnClick(GUIControl *control, MouseButton button)
{
if (LibraryControls  == 0) SetGlobalInt(LibraryControls, 1);//(sets to 1 library mode)
else 
if (LibraryControls == 1) SetGlobalInt(LibraryControls, 2);  //(sets to 2 Exterior Scanner mode)
else
if (LibraryControls == 2) SetGlobalInt(LibraryControls, 3);  //(Sets to 3 Interior Scanner mode)
else 
if (LibraryControls == 3) SetGlobalInt(LibraryControls, 4); //(Sets to 4 Science Reports)
else
if (LibraryControls == 4) SetGlobalInt(LibraryControls,  0); //(sets back to 0 select mode
}
#22
My game is set at 800x600 resolution
I am using a background image which is 7200x600
bsically I have 9 different backgrounds on my 7200x600 background and want each to act as a seperate backgroun only when I need them.

I do not want this background image to be a scrolling screen nor do I want to use the multiple background option.
I want each 800x600 part of the 7200x600 image to act as a seperate screen.

Example I want the screen to be set at the first 800x600 location then if the player walks to the edge or off screen i want the screen
not to scroll but to fade out and fade back in with the new location the player located at to be another area of the 7200x600 screen.

If I can give any more info on this I please ask me getting this to work is crucial to the entire rest of my game as I will have to do this quite
often to make things work the way I want.
#23
I have an invisible character following my main character around

I am wanting to do something simular to this I want to to be able to click on a npc character
then have the invisible character become visable and take on the graphic of whatever selected weapon was choosen
and have that character move to the location of the npc that I just clicked on.

im not sure how to get the mouse click coordinates when I click on the npc then use that to tell the character to goto that location.
the npc will be at random locations at random times.

thank you for any help given
#24
I currently have my game set up to advance the text with keyboard press using the option in the general settings that ask you if you want to advance text with keyboard mouse or both

I would rather fix it so the text is skipped via the space bar only as players are complaining that sometimes when entering a mini game or new scene they accidently advance the text with the arrow keys or some other interaction.

how do I bypass the settings and script it to just skip the text with the space bar
#25
I am trying to do a space battle scene where you have a large space background and your look like your moving around though a viewscreen on a ship.

I am using this code

if (cKirk.x > 4590) cKirk.x = 405;
  if (cKirk.x < 404) cKirk.x = 4590;
  if (cKirk.y > 4690) cKirk.y = 305;
  if (cKirk.y < 304) cKirk.y = 4690;

to tell you when you get to the edges and to loop the screen around

we are using the arrow keys to move the character and using pressing function for the sensitivity

problem is when we get to the edge the screen stops you have to stop pressing the arrow key and press again to get it to loop

we tried to solve this by doing a keypress request and manually tell it to press in that direction when you get to the edge

however it does loop but is sluggish or not perfect

does anyone have a better idea or way of doing this where it will appear instantly to make the loop?
#26
Ok,

I have the following things in my room.

1) Large scrollable space background
2) 25 seperate hotspots which in total cover the scrollable background
3) 1 large region which covers the entire scrollable background.
4) a radar gui at corner of screen (which has 25 invisible buttons representing the 25 hotspots above)

now I have two characters a player character which is set to a crosshairs cursor and looks like the viewscreen of a ship moving
then I have a npc character which is the enemy ship moving around the screen at random

this is the script i used to move the NPC around


bool found;
 int x,y;
 if (!cGronShip.Moving) {
   while(!found) {
     x = Random(Room.Width);
     y = Random(Room.Height);
     if (Region.GetAtRoomXY(x, y) == region[1]) found = true;
   }
   cGronShip.Walk(x, y);

it works the npc moves all over the place like I wanted

I have the hotspots set up so that when the player character (the crosshairs of the viewscreen) move over the hotspot it changed the correct button image on the radar gui to make it look like your showing the player characters ship on the radar

this also works perfectly

the problem I am having is I guess step on hotspot or walk on hotspot codes do not work for npc characters that are moving over those hotspots

so How do I get the hotspots to understand when my NPC ship is over those hotspots so I can get them to appear on the radar too.

basicaly I need to know how to get the npc to appear on my radar screen too

the code im doing for the radar for the player character is

function hradar1_WalkOn()
{
if (player==cEnterprise {

  Radar1.NormalGraphic=2142;
}
}

but no matter what i do i cant get this to work for npc characters that move onto that hotspot
#27
Hello.

I need to move a NPC character to multiple coordinate locations.

I need him to move to location A then B then C and so on and so forth.

But I do not want the script to be blocked as I want the player character to be doing stuff as the NPC is moving around.

So i cant use walk or move with a blocking feature.

I thought about using an int and with each number added having it to tell it to then go to the new location but I cant do that without blocking eighter.

Whats the best way to script it so the NPC moves around to all these multiple locations and does not block script.

#28
If this is in the wrong place I am not sure where it should go so forgive me.

I have noticed a few other Star Trek Projects along the way around here and some other places lately.

I wanted to offer anyonec creating a Star Trek game free hosting of site at www.startrekadventures.com/yearone
I will be setting up an area for hosting details soon.

There is no charge or requiment other then your project has to be related to Star Trek.

We will be launching another site soon which will provide hosting for other AGS type games as well.

Thanks and if this was in wrong place sorry.

#29
I have a room in my game which has many hotspots and coding which would be hard to reproduce.
I need to have a duplicate of this room which I can edit for a hard/easy difficulty setting

it seems to be the easiest way to do this is to import a duplicate of the existing room then edit
that room with the changes I need.

i know I can import whole rooms or at least I think you can.
but if I import a room which already exist in the game will it overwrite or mess with the existing room
or will it just be named something else and exist as two seperate rooms?
#30
Ok I already have one game just about completed I used DisplayAt to display my text where I wanted it on the screen when doing dialogs.
this worked fine whole game.

Now I just created a default game and started a new game with it.

I am trying to use the same Displayat command but and I have the same textwindowgui as I had in the other game except now a black border appears around my text.

Cant remember if i had this problem last game and fixed it or not anyone know how to remove the black border I have all the settings same as the other game far as i know
#31
I see ags has the ability to have diagonal walk animations.
from what I see you assign them to a specific frame under the characters view
and click the box that says use diagonal animations

My question is this say you had not planned to use them and filled those locations with other sprites and it would be way to much trouble to
go though whole game and change them.

Can diagonal sprites be added to other frame set other then the default and scripted to look there for them instead?
What would be involved and would it be easy enough at last min in a game to code in and do?
#32
What Is the easiest way to get a mouse over effect on a gui passover

I have a gui that is 800*100   running across the bottom of the screen

I want when the mouse moves into this space for it to change the cursor to a certain cursor
#33
I have game settings set to 800*600

I want to import a background which is smaller then this at 800*445

I want black space at top of 800*55
and black space at the bottom which is 800*100

which I will use for some gui's

I am trying to figure out how I posistion the room to do this
is it the edges section on the side panel?

I see a menu on side panel that says edges and

bottomedgeY
leftedgex
rightedgex
topedgey

but not sure how I need to put the numbers in there if thats the right place any able to help?

#34
I see the command to get a character to follow another player but how do you tell him to stop following
#35
Is it possible to script a code for a beta game in ags where it looks at the system date or information and does not allow game to run if its past this date and gives them a message that the beta test is over download the full version?
#36
I want to be able to set up the "+" and "-" keys to increase or decrease a characters walk speed.

how would I go about doing this im sure I have to put it in the global script
#37
I created me a view for my characters idle animations
set the correct number of the idle view in the tabs on the side that says idle view

the character does not idle

what could be causing this?

is scripting needed in addition to putting the idle view number in the side panel?
#38
Ok I have a gui which has my character avatars and icons and such on it I have a space on the gui I want to display the active inventory item

I have been told to create a button on the gui then in the gui text place (INVSHR)

I have done this and only get a grey button no active inventory item do I have to do something else?
#39
I am having issues

I have a menu bar at top which is basically a modified version of the default menu bar
in that menu bar the load game screen works fine and loads saved games and shows the list
also when you press f7 is appears and works fine

however I have a hotspot on a menu page and I can not get it to work from there
the gui appears and the listbox is empty and will not show my saved games

I get a message on screen that says sorry not now

I am using the same RestoreGameDialog();  as in the button at the top panel

#40
I have several explosions that will injure the character if they touch the explosion area.
I have a INT set as CharacterHit set to 0

I need to as you come into contact with the explosions be able to tell the game to increase the INT by +1 each time your hit by an explosion.

How do I do that I know its a simple one line thing im sure.

I know if i wanted to set the number i would do CharacterHit = 2;

But I need it to be more random so i can keep track of the players health.

is there anything like CharacterHit + 1;

or something simular that would increase the number by one for me.

SMF spam blocked by CleanTalk