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 - Sparkplug.Creations

#1
Hello,

I have an animation view of an explosion for a specific object. Everything is scripted and functionally works, but the animation view is offset from the object. The object is called oPredator and here's my code:

Code: ags

if (bCheckCollisions == true)
    {
      // EXPLOSION
      if (oHellfire.IsCollidingWithObject(oPredator))
      {
        //Display("KABOOM");
        //ShakeScreenBackground (int delay, int amount, int length)
        ShakeScreenBackground(5, 15, 20);      
        oPredator.StopMoving();
        //oPredator.Visible = true;
        oHellfire.Visible = false;        
        oPredator.SetView(4);
        oPredator.Animate(0, 5, eOnce, eNoBlock, eForwards);
        
        // Stop moving the missile
        moveHellfire = 2;        
      }
    }


For some reason, the animation of the explosion appears in a different location from where the oPredator object is. Any idea how I can make the animation centered over the oPredator object? Thanks,

-Reid
#2




What Goes Around
This is a ONE screen game where the player attacks a strange alien like object with their Predator Hellfire missile but then it disappears. The missile loops from right edge to left edge and the player can't do anything but avoid it for as long as possible. That gets difficult as time passes since the missiles' path becomes more erratic and harder to predict.

The game sacrifices traditional gameplay structures to communicate a specific message, which is, "What Goes Around, Comes Around." It is based on a anti-war campaign by the Global Coalition for Peace, designed by the ad firm Big Ant International.

Example images:
http://theinspirationroom.com/daily/2009/what-goes-around-comes-around/

Upon seeing the second image of the fighter jet firing the missiles and then upon wrapping the poster around a pole, those same missiles end up on the tail end of the fighter jet, I knew I could make a game that communicated the same message just as well. I decided to take on the challenge and I am happy to report my progress.

Progress
- graphics collected or made (80%)
- graphics implemented (50%)
- puzzles N/A
- scripting 80%
- music/sound 0%

Todo Tasks
- implement images of civilians caught in war scrolling in top bar
- implement quotes of war scrolling in bottom bar
- create and implement main menu text and scripting
- create and implement help text/UI images of how controls work
- find free sounds and implement them

Contract Work
I am looking for an animator who can create an explosion for when the missile collides with the players' Predator drone. Please email me, info [at] sparkplugcreations [dot] org. I am able to pay and provide a contract Work Order that we both sign. If interested, please provide samples of prior work.

I'd be happy to hear your feedback, criticism and questions.

Thanks,

-Reid
#3
Hello,

I am working on a very small game, one playable character, one enemy and one weapon. I have player movement done and I attempted to figure out how to allow the player to fire their weapon with the spacebar and only half succeeded.

Right now, when players press spacebar, the missile moves from left to right. What I am stuck on, is the logic (and where to place the code) for expanding this so that when players press spacebar, a new missile object is created and behaves independently of other, previously fired missiles.

Here's what I think I need:
1. On key press events must be in the global script (this works already)

2. When spacebar is pressed, create a new missile object (how do I do that?)

3. Run a function controlling the motion of the missile object. How fast it moves and when to loop around to left of screen when it exits on right side. (Where do I write this function? Room script? I have this code working on my room placed missile object.)

4. Collision detection between missile object, enemy character and player character. (What functions are needed and where do I write them?)

Summary
How do I create new missile objects upon key presses and control them independently of others?

Thanks for the help,

-Reid
#4
I got the following error because my description text had too many characters. It's fixed now but the dialog box that came up made it look like the editor crashed. Is it possible to pop up a friendly looking warning box and let users know what the character limit is? Or even better, when typing in a description for anything, if it has a limit, prevent the user from entering more text beyond the limit?

Code: ags

Error: String is too long: Executive Branch confidentiality interests
Version: AGS 3.0.2.42

AGS.Types.AGSEditorException: String is too long: Executive Branch confidentiality interests ---> AGS.Types.AGSEditorException: String is too long: Executive Branch confidentiality interests
   at ConvertStringToCharArray(String clrString, SByte* textBuffer, Int32 maxLength)
   at save_crm_file(Room room)
   at AGS.Native.NativeMethods.SaveRoomFile(Room roomToSave)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   at AGS.Editor.Components.RoomsComponent.SaveRoomAndShowAnyErrors(Room room)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreSaveGame(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreSaveGameHandler.Invoke(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
#5
I only use global variables with the new 3.02 release because it's super easy to use, declare them in one place and then any room script can access them.

Are there any downsides to doing this instead of using local variables?
#6
Hello,

I'm getting error when I use the following code in the repeatedly execute funtion of my room:

Code: ags

intDistObject01 = Maths.Sqrt((oClearArea.X - oTestObject01.X)*(oClearArea.X - oTestObject01.X)*(oClearArea.Y - oTestObject01.Y)*(oClearArea.Y - oTestObject01.Y));

lblDistObj01.Text = String.Format("Distance: %d",intDistObj01);


The error is:

Quote
Failed to save room room12.crm; details below
room12.asc(524): Error (line 524): Type mismatch: cannot convert 'int' to 'float'

Truthfully, I copied this code from another thread here and changed the object names to my own. I am trying to caculate the distance between objects and display the distance in a label. Ultimately, I want to fade out an object the further away it is using transparency.

I have tried using a float variable to save the result of the equation and tried using FloatToInt() on the equation, saving it to an int variable, but neither worked.

I appreciate your time, thanks,

-Reid
#7
Hi,

I know that the executable is based on the name of the directory the game is in, which isn't what I want since my directory is named "DevTree". I know I can rename it, but I would like to request the ability to manually specify a different name for the executable instead of the directory name. Perhaps in the General Settings?

Thanks,

-Reid
#8
Hi all,

I'm interested in creating cuscenes that are very up close and personal with the characters, focusing on their faces and showing a lot of emotion. In what ways can I hope to implement this in an AGS game? I've done a lot of searching on these forums and haven't found a topic discussing this approach yet. If someone can direct me to one that'd be helpful.

The background animation technique is limited to 5 frames of animation, so that won't work. Is it possible to create very large, almost full screen sized "characters" that only show a character from the shoulders up?

Any other solutions?

Also, are this limitations still in effect for AGS 3.0?

600  views
16  loops per view
20  frames in each loop

I can see a need for my game to use more than 20 frames per loop, for example, to show a char talking, wiping sweat from his forehead and then getting very angry.
SMF spam blocked by CleanTalk