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

Messages - RetroJay

#181
Hi Crimson Wizard.

No Sorry, I got that wrong.:-[

What I meant was that I was working with a character and entered a view number for it that didn't exist. (I Should stop scripting when I get too tired.);)
You see, I wanted my character to play an animation and thought 'I will just do this and call it a night'.
AGS told me that it was an invalid number and then threw a fit.

Sorry for the confusion.

Yours.
Jay.
#182
Advanced Technical Forum / AGS Error Report.
Thu 11/09/2014 23:19:16
Hi All.

I think that this is the right forum for this subject.

Ok. Tonight I was merrily working away when AGS suffered a large crash.
At the time I was working on a Character and had inadvertently entered the wrong ID number for it.
AGS told me I had but then everything went wrong.8-0

I am using AGS 3.2.1 (Draconian Version)
I tried to send an error report to AGS Server but couldn't.
So I was told to post it here.
QuoteError: Object reference not set to an instance of an object.
Version: AGS 3.2.1.111

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.CharactersEditorFilter.GetCharacterRect(Character character, Int32 scale, RoomEditorState state)
   at AGS.Editor.CharactersEditorFilter.Paint(Graphics graphics, RoomEditorState state)
   at AGS.Editor.RoomSettingsEditor.bufferedPanel1_Paint(Object sender, PaintEventArgs e)
   at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

All is well, though, with my project and nothing has been lost.;-D

Yours.
Jay.
#183
The Rumpus Room / Re: Happy Birthday Thread!
Thu 28/08/2014 18:44:08
Hi There Mouth for war.

Happy Birthday, my friend.:-D
And may you have many more.

Yours.
Jay.
#184
Hi Khris.

Ha Ha!
That has done the trick.
It works beautifully.:~(:~( (These are tears of joy.)

Please, Khris, no need to apologise.
I couldn't have got this far without your help.
By the time I'm finished I might just as well say 'Game created by Khris' in the credits.;)

All I need to do now is remember where all the keys went on my yekdraob and purchase a new mouse (It landed somewhere in the neighbours garden.) :P

As always, Khris, Thank you for your help and time.
It is much appreciated.

Yours.
Jay.
#185
Hi Khris.

I'm so sorry but I can't get this to work.:(
This game is really doing my head in.

I hope you don't mind but I have sent you a PM regarding this matter.

Once this is resolved I will post the solution to my problem.
It may help other people to achieve what I am so obviously failing to achieve.

Yours.
Jay. 
#186
Hi Khris.

Sorry, I pasted your script but am getting an error with line 6 in your example.
AGS says:
QuoteCannot declare local instance of managed type
Whatever the hell that means.???

I have this, at the moment.
Code: ags
int npcx[20], npcy[20];

void SetupNPCs() {
  bool game_starts = Game.DoOnceOnly("store NPC positions");
  Character npc;
  int ch = 0;
  while (ch < Game.CharacterCount) {
    npc = character[ch];
    if (npc.Room == player.Room && npc != player) {
      // if this is the start of the game, store all initial positions for later use
      if (game_starts) { npcx[ch] = npc.x; npcy[ch] = npc.y; }
      // otherwise, move characters back to initial positions
      else { npc.x = npcx[ch]; npc.y = npcy[ch]; }
    ch++;
  }
}

 
function room_Load() {
  SetupNPCs();
  gui[0].Visible = true;
  mouse.Visible = false;   // This disables MOUSE controls.
  RemoveWalkableArea(2);
  oGrandfather_Clock.SetView(6, 2);
  oGrandfather_Clock.Animate(2, 19, eRepeat, eNoBlock, eForwards);
  if (cDan.PreviousRoom == 4) {
    cDan.FaceLocation (640, 400);
  }
  else {
    cDan.FaceLocation(0, 400);
  }
}


This looks very interesting and, more than likely, just what I need.
It must be said that I don't understand some of it, though.

Yours.
Jay.
#187
Hi Peeps.

In my game I have npc's that walk from left to right and up and down.
I have the code below inside the rooms Rep_Exc_Always.

Code: ags
   // NPC MOVEMENT SCRIPT.
   //---------------------
   // This section makes GHOSTS and other CREATURES move.
   if (!cZomb.Moving) {
     if (cZomb.x < 200) {
       // If the Zombie is on the left hand side of the screen,
       // start it moving towards the right.
       cZomb.Walk(612, cZomb.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left
         cZomb.Walk(28, cZomb.y, eNoBlock, eAnywhere);
       }
   }
  
   if (!cZomb2.Moving) {
     if (cZomb2.x < 200) {
       // If the Zombie is on the left hand side of the screen,
       // start it moving towards the right.
       cZomb2.Walk(398, cZomb2.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left.
         cZomb2.Walk(162, cZomb2.y, eNoBlock, eAnywhere);
       }
   }
  
   if (!cZomb3.Moving) {
     if (cZomb3.x < 300) {
       // If the Zombie is on the left hand side of the screen,
       // start it moving towards the right.
       cZomb3.Walk(612, cZomb3.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left.
         cZomb3.Walk(286, cZomb3.y, eNoBlock, eAnywhere);
       }
   }
  
   if (!cGhost.Moving) {
     if (cGhost.x < 100) {
       // If the Ghost is on the left hand side of the screen,
       // start it moving towards the right.
       cGhost.Walk(582, cGhost.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left
         cGhost.Walk(54, cGhost.y, eNoBlock, eAnywhere);
       }
   }
  
   if (!cGhost2.Moving) {
     if (cGhost2.x < 100) {
       // If the Ghost is on the left hand side of the screen,
       // start it moving towards the right.
       cGhost2.Walk(607, cGhost2.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left.
         cGhost2.Walk(32, cGhost2.y, eNoBlock, eAnywhere);
       }
   }
  
   if (!cSpidey.Moving) {
     if (cSpidey.y < 300) {
       // If the Spider is towards the bottom half of the screen,
       // start it moving towards the top.
       cSpidey.Walk(cSpidey.x, 300, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the bottom.
         cSpidey.Walk(cSpidey.x, 264, eNoBlock, eAnywhere);
       }
   }
  
   if (!cSpidey2.Moving) {
     if (cSpidey2.y < 300) {
       // If the Spider is towards the bottom half of the screen,
       // start it moving towards the top.
       cSpidey2.Walk(cSpidey2.x, 300, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the bottom.
         cSpidey2.Walk(cSpidey2.x, 264, eNoBlock, eAnywhere);
       }
   }
  
   if (!cMummy1.Moving) {
     if (cMummy1.x < 200) {
       // If the Zombie is on the left hand side of the screen,
       // start it moving towards the right.
       cMummy1.Walk(258, cMummy1.y, eNoBlock, eAnywhere);
       }
       else {
         // Otherwise, move it towards the left
         cMummy1.Walk(28, cMummy1.y, eNoBlock, eAnywhere);
       }
   }
 }
  // END OF GHOST AND CREATURE MOVEMENTS SCRIPT.
  //--------------------------------------------


This works just great.
The problem is when I leave this room and re-enter.
If I leave the room when npc's are half way across the screen and then re-enter, the npc's scurry back to their start positions. (This ruins the timing of creatures for this room).

I tried to make a 'Global Bool' and moved my movement script to GlobalScript.asc (Rep_Exc_Always) and call it from the rooms Rep_Exc_Always.
I got this to work but the npc's still behave the same.

Now I know why this is happening but is there a way to either stop them in their tracks, when the player leaves the room, and to continue in the correct direction when player re-enters.
Or to continuously have them moving even when the player is not in that room?

If I could just get this to work, it would be a great leap forward.

Any help would be much appreciated.

Yours.
Jay.
#188
General Discussion / Re: Kerbal Space Program
Fri 15/08/2014 22:39:10
Hi Snake.

Well, I took the plunge and bought it from Steam.
Really like what I have seen so far.
Obviously there is much more to it than the demo version, more to graphics, gameplay and even runs smoother.

I have been doing the tutorials which I find rather confusing, at the moment.
The worst one so far is the 'Orbiting 101' tutorial.
For some unknown reason I can't seem to orbit Kerbal, well... actually I do know the reason and it's because I'm doing it wrong.:-[

Anyway, I'm off to kill a few more suicidal kerbals now in my attempt to land on Mun.(laugh)

Yours.
Jay.   
#189
General Discussion / Re: Kerbal Space Program
Fri 08/08/2014 03:42:52
Hi DoorKnobHandle.

I heard that it's on Steam and that they are having a Summer deal on it.
I haven't checked it out, yet, so whether that's true or not... I don't know.
Not that it makes any difference to me as I refuse to create a Steam account. (I don't like what they do.)

Edit:
Just had a look on Steam and they are selling it for £20.00.
I may have to buckle and create an account after all.

Yours.
Jay.
#190
General Discussion / Kerbal Space Program
Fri 08/08/2014 02:18:57
Hi All.

Sorry to post another thread (I have verbal diarrhoea tonight.)(laugh)

Anyway, Kerbal Space Program.
Does anyone here have this, pretty awesome looking space sim, and play it?

I only stumbled upon it two nights ago and downloaded the demo version of it to try.
At the moment I am hooked and have killed off so many Kerbals in my attempt to create a space worthy vehicle, capable of visiting the nearby moon 'Mun', that I am now a mass murderer.
Tonight was the maiden voyage of my new rocket and, it must be said, all was going swimmingly... That was until I overlooked a small technical detail and jettisoned the wrong section.8-0
This resulted in poor Mr Bill Kerman, my fearless/stupid astronaut, gradually disappear into the infinites of space in his un-powered space module, never to be seen again.:~(

As you can hear, I am totally enjoying the demo version and am thinking of purchasing the full version.

Are there any Kerbalers out there who have the full version and is it a good purchase?

Yours.
Jay (Captain James Tiberius Kerman).   
#191
Hi Khris.

Good to hear from you.

That's great.
The only problem is, whenever I try to Open with wordpad to view the file it keeps asking me if I want to run the file.???
So I can't see if it is the same as you have showed me.


Edit:
Forget what I just said.
After some time I managed to view the file and it says exactly what you said it would say.
I merged the reg file and The 'One Drive' folder has now departed my system.
The only remnants of it are on the Metro screen.
If I click on it a page opens up to tell me it has been disabled, which is just what I want.

Thank you for your help on this, Khris

Yours.
Jay.
#192
Hi Adeel S. Ahmed.

Thanks for the quick response.

Yes, I suppose I could do that, just in case that "Downloaded Registry" do-dah thingy is bad. (I may have overdone the ' on my first post.)(laugh)

Thanks for your help.

Yours.
Jay.
#193
Hi all.

Just wanted to pick your brains for a moment.

On my 'Windows 8.1 home edition' desktop computer I have the 'One Drive' folder, which was called 'Sky Drive'.
I wish to get shot of this program as I don't use it, nor wish to ever use it.
I have managed to uninstall it from 'Program features' (add and remove). however...
Reading on-line people were saying this couldn't be done.

There is still the matter of removing the folder from 'File explorer', which I can't get rid of.
Others have suggested using 'regedit' but I really do not want to tamper with registry entries.
People are, also, saying that you can use 'gpedit.msc' (from the Run command) to rid yourself of this useless program.
Unfortunately, it appears that 'Windows 8.1 home edition' doesn't have this feature (only Pro and Enterprise).

Now, I have downloaded a 'registry' file from 'Windows 8 forums' which is supposed to disable 'One Drive/Sky Drive' but am always wary about such things.

With this file sitting in my 'Downloads' I don't want to do anything else until I have enquired as to whether anyone else has either got rid of 'One Drive' another way or
used this 'Rgistry Download' from 'Windows 8 forums'.

Any help on this matter would be very... Well helpful, really.:)

Yours.
Jay.
#194
Hi AnasAbdin.

Absolutely fantastic.
Thank you ever so much for that, it works like a charm.

I did have to change it slightly as my game would not compile.
Code: ags
if (IsKeyPressed(eKeySpace) && gMansion_Map.Visible == false )


I have put this at the beginning of my hotspot and region scripts.
I tried it in 'on_key_press' to see if I could get it to run globally but it didn't want to know.

Anyway, thank you for your help, much appreciated.

Yours.
Jay.
#195
Hi all good peeps.

Here is my problem.
I have set my game to use keys only.
All was going splendidly until I wanted to implement a Plans/Map gui, with the push of the P key.
The Plans/Map gui is a full screen gui and set to 'pause game when shown'.
This all works fine, the Plans/Map gui turns on and off with the push of P and the game pauses/un-pauses when this happens.

However...
On my game screen I have hotspots and have set the 'Space key' to examine these spots.
I only found out the other night, by chance, that if the player character happens to be over a hotspot when the Plans/Map gui is displayed, pushing the space key still operates behind the gui and locks the entire game.
Obviously I don't want this to happen but don't quite know how to rectify this

Could someone please help me with this small but exceedingly irritating problem.

Yours.
Jay.
#196
Hi Paul.

I had something very similar to this happen once and it turned out to be the zOrder of my GUI's.
But you say that you haven't seen it yourself, yet, and haven't been able to replicate it.

I'm sorry I can't be of more help but the zOrder of your GUI's is the only thing I can think of.

Yours.
Jay.
#197
Hi Khris.

Yep, that's cured it.;-D
Actually, I think that Method 1 works better for what I need.

Thank you for your help, Khris.
It's much appreciated.

Yours.
Jay.
#198
Hi Khris.

I completely forgot about the megabytes, I still have left on my phone.
So here I am sitting at work typing this message to let you know that your script works beautifuly.:)

I had to use Method 2, which is a shame, because Method 1 wouldn't work.
I receive this message...
Error running function
'Room_RepExec':
Error Null pointer referenced.

When I am home I will post the complete script here.
It maybe useful to other people.

Thank you for your help.
As always it is much appreciated.

Yours.
Jay.
#199
Hi Khris.

Long time, no speak.
It's great to hear from my mentor.;-D

This looks like it maybe exactly what I'm looking for.
I have printed out your script so I can take it to work with me and try it over this Bank Holiday.
Unfortunately I won't be able to tell you how things go until Tuesday Evening.:(

Thank you ever so much, I really appreciate you taking the time to look at this for me.

Yours.
Jay.
#200
Hi Ghost.

Believe me, I'm not happy about the whole thing.;)
This was only supposed to be a simple game to take my mind off of my main project.
And now it's developed into a large pain in my butt.(laugh)

Mind you. That Idea you have had, regarding the attack sound on a frame, might just work.
I will continue tinkering and let you know how it goes.

Thank you for your help.
Jay. 
SMF spam blocked by CleanTalk