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 - Dr Lecter

#41
Beginners' Technical Questions / Re: Exports
Mon 03/10/2005 21:28:50
Alas, I do rather need them outside. Its for my shooting engine, I'm adding bullet holes, and the like, to it. I suppose I could use a really REALLY long if statement, but it would easier if I could. Ah well, if statement here I come!
#42
Beginners' Technical Questions / Exports
Mon 03/10/2005 21:05:14
I've searched the forum but none of them seem to explain it, and the manual doesn't work for me either. When I try to export some variables, I get this:

---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was:
In: 'Global script'
Error (line 136): invalid export symbol 'somethingelse'

Code: ags
      	 if (IsInteractionAvailable (mouse.x,  mouse.y, eModeShoot) == 1) {
           int left = Random(5);
           int right = Random(5);
           int up = Random(5);
           int down = Random(5);
           int somethingelse = mouse.x +left -right;
           int somethingelse2 = mouse.y +up -down;
				 ProcessClick (somethingelse, somethingelse2,  eModeShoot);	
					export somethingelse;
					export somethingelse2;	 
				 }

I also tried putting the export at the end of the global script but it said the variable wasn't defined.
#43
I believe as long as you don't charge money for any game you make on it its perfectly legal, the only reason why they put so much effort into the security is to stop you playing illegal games, home-brewed is the least of their worries. But, if there isn't enough RAM, then damn, that sucks. I guess any games I make in it will have to be written in a pure C++ language.
#44
It will run any C++ based game/program.
#45
I don't see any posts about this so I thought I'd start one.
I ordered myself a PassMe a few days ago, so when it comes in I'll be playing games like Monkey Island and such like on DS. I was just wondering if CJ would support a DS port of the engine to let you play AGS games on it. They ported scummvm to the DS:

http://scummvm.drunkencoders.com/

I think that you could easily move the game itself onto the DS, but I think you would need an engine port to change the controls and resolution, etc.

Just imagine... Mmmmm... Erm, anyway... it would be cool
On another note, I may infact finish this game. I'm still working on my combat engine but damnit I keep needing to change variables back and forward from int to strings and vice versa.
#46
I got my site up, looks cool http://www.drlecter.i8.com/index.htm
#47
I want to keep what I'm doing secret ;)
Its extremely complicated and I've only just got my head round the concept I'm using to impliment it into code. Hell it took me about 3 days just to design the concept on paper and get my head round how to naturalise it to a degree where a computer could understand it. Plus, it means if I fail I can just delete it and you wouldn't know  ;D
#48
Can you guys remind me not to take on something as crazy as this again? I've just written like 200 lines of code, but as far as the player knows nothing has changed.
#49
Ah thats the route I was trying to avoid, I've started that already with the hope that is the not equal to function that would allow me to delete it all, alas, if it does not exist I must code it the hard way.
#50
Beginners' Technical Questions / Not equal to
Thu 11/08/2005 11:11:05
Is there a function for having a random variable not equal to another variable, such as:
a=random(4)
b=random(4) not equal to a
c=random(4) not equal to a or b, etc

If someone could tell me how this is possible it reduce the amount of code I have to write by alot. I don't believe this is covered in the manual, but I may well have missed it.
#51
Erm... I tried using the script with version 2.7 and this happened:
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0043072C ; program pointer is +379, ACI version 2.70.864, gtags (1,1)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK   
---------------------------

Something tells me that isn't very good...

I don't know how I plan to do this, but I'm going to try and make a much simpler custom version of is, minimised down so that it only covers what I want it to.
#52
It wouldnt interfere with anything... but I have no animation... but I guess i know what I could use instead... don't worry, not only have I worked out to to do it, I've also worked out how to make timers work.
#53
My forum:
http://drlecter.mypunbb.com/index.php

Site coming soon, but untill then that is my site.
#54
Maybe that's why you should start with something that you have an idea of how to do?
#55
Shouldn't you atleast start some of it yourself?
#56
You can do this straight from the global script.
Go down to where it says:
#sectionstart on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE
Then look for the line with the comment // right-click, so cycle cursor.
The line below is the line we want to edit.
It should say
Code: ags
mouse.SelectNextMode();

Replace it with
Code: ags
ProcessClick(mouse.x, mouse.y, eModeWalkto );


Also finally, a couple of lines above you should see the line:
Code: ags
ProcessClick(mouse.x, mouse.y, mouse.Mode );

Replace the
Code: ags
mouse.mode

with
Code: ags
eModeInteract
#57
I'm having a problem making a reloading script for my game, its pretty much an exact copy of that by Ponch, apart from using non-redundant code but I don't know why the timer won't expire. Yes, yes I know this has been asked before but nothing seems to make it work ??? heres the code:

Code: ags
function repeatedly_execute() {
  // put anything you want to happen every game cycle here
if (IsTimerExpired(1) == 1) {   
 mouse.Visible = true;
}
}


Code: ags
function hotspot2_a() {
  // script for Hotspot 2 (Hotspot 2): Shoot hotspot
  // Reload
if (GetGlobalInt(1)>=1) { // If the player has a clip left
 SetGlobalInt(1, GetGlobalInt(1)-1);//lose one clip
 SetTimer(1, 90); // Set Reload Timer
 //AnimateObject - Reloading Graphic
 mouse.Visible = false; // so the player can't shoot while reloading
  } 
else { // the player is out of ammo
 Display ("I'm out of Clips!");
  }   
}

Once you shoot the hotspot, the mouse is disabled, but the timer won't expire and hence the mouse doesn't get re-enabled.
#58
Well I was working on it all yesterday after I made my game interface code. So far, I've made the target move accross the screen, I've disabled all the other cursors and actions apart from shoot, I've made it reload, about the only thing that won't happen is that the target won't die!!!!!!! He just keeps moving across the screen! I think I know what the problem is but when I've fixed it, it will be cool.

Also, in response to Brisby, its important to keep code up-to-date, as there may be future versions of AGS where old-fashioned-coding is not usable. That and, I like using the new version, I've never made and real games with the any version so I thought I may aswell get stuck into the 2.7 code.

*edit*
Oh my god, I can't believe how simple it was! I reference it to move the main character out the room, not the target, no wonder it wasn't doing anything! Basically, now I've got it to do just about everything apart from reload so thats the next step, once thats done I'll put my cards on the table. Of course its not standardised because its modified to work with the interface for the game I making meaning that I could cut quite abit of code where other people probably couldn't.
#59
I've done a 2.7 friendly version of this, although it is different because there is no support for inventory at all since the game I'm making as no active inventory, hence no using items on items. But if you want my code here it is:

Code: ags

function on_mouse_click(int button) {
// Makes note of which button was clicked
   if (IsGamePaused() == 1) {
   // Game is paused, so nothing happens
   }
   else if (mouse.IsButtonDown(eMouseRight)) {
      // If there is nothing to look at:
         if (IsInteractionAvailable(mouse.x,mouse.y, eModeLookat) == 0) {
  Display("Haven't you got better things to look at?"); // Insert your message here
   }
else  { // Since there is something to look at, look at it
ProcessClick (mouse.x, mouse.y, eModeLookat);
   }
   }
   else if (mouse.IsButtonDown(eMouseLeft)) {
      // If there is nothing to use, so walk
         if (IsInteractionAvailable(mouse.x,mouse.y, eModeInteract) == 0) {
ProcessClick (mouse.x, mouse.y, eModeWalkto);
   }
else { // Since there is something to use, use it
ProcessClick (mouse.x, mouse.y, eModeInteract);
       }
   }
}

If people want an inventory version I may be perswaded into adding it
#60
For the 2.7 "objectoff" is now obsolete.
(I only found these by trying to compile the game then looking in the manual for the updated version, but it'll save anyone that wants to use this for needing to, but I haven't tested it yet so they could still be wrong, even though the compiler doesn't say so)
You need to replace it with:
object[0].Visible = false;

DisableCursorMode is now obsolete
You need to replace it with:
mouse.DisableMode(eModeSHOOT!);

EnableCursorMode becomes:
mouse.EnableMode(eModeSHOOT!);

MoveCharacterDirect(PONCH, x, y); becomes:
character[PONCH].Walk(x, y);

StopMoving becomes:
character[PONCH].StopMoving();

I'm not quite sure what to replace the:
  character[PONCH].room=0;
  character[PONCH].x=0;
  character[PONCH].y=0;

but try:
character[PONCH].ChangeRoom(0, 0, 0);

(After testing)
Something is wrong with it though since it, it won't display the sight, the targets won't move and picture is stuck at the side, I'll mess about with it abit and see if I can make it al work. Probably the compiler missed something or I didn't put the right variables in.

*edit*
I can't seem to find what the problems are so I'm just going to start the whole code from stratch using Ponch's as a guideline, I'll post it when I'm done.

(We have lift off, sorry but this post has been spread out over about 2 hours, even though it looks like just one time frame)
SMF spam blocked by CleanTalk