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 - smartastreacle

#1
Hiya,

Really simple one. I've looked around but can't quite find the answer.
I have a 'rocket' object that takes off and then explodes at a certain Y. What I want is for the rocket to accelerate after take off.
So far I have the rocket, its movement to Y and its explosion. What I haven't got yet is the acceleration bit. I know this is easy, but it's collapsing my easily challenged brain. Any ideas welcome.

 :)
#2
Hi,

Let's see if I can explain this well:

I have a country scene object (A) bigger than the display area which I want to move around so it looks like we are flying over it. I have another object (B) which may be a windmill which I wish to animate. Object B starts out of the display area and appears when we move the scene (A). My question is - can I anchor B at coordinates on A so it moves with A and so treat A as a background? For various reasons I can't do a normal background thing. Hope this is clear? Any advice welcome. I see there are changes being made to the forum, hope this question appears.   
#3
Hi, bit of a potential mind crusher. Almost finished my game and got an error message when I tried to open and edit - 'Could not find file (path) TwoClickHandler.ash'. Anyone have a solution for this? I closed the game script etc., about an hour ago and just tried to reopen it.  :(
#4
General Discussion / Thank you
Wed 29/12/2021 11:49:19
Forgive me - just a belated Happy Xmas and a future fine New Year to everyone and in particular those tireless experts on here who provide solutions  :-D. Just had a game break through, so I am feeling particularly happy (nuts)  (roll). Please keep this place going.  (nod)
#5
Oookay - raising my head with a question again (always find this scary)  8-0
Imagine an industrial complex overrun by aliens. We enter the room (industrial complex), an alien scout spots us, dives back into a shed where it raises the alarm and the alarm brings out a small army of aliens who line up and start shooting at us. That's what I want. Every thing works fine until the shooting bit - that animation stops on the first frame. I put that animation in repexec-always because I thought with enoblocking it would work there whilst with enoblock in standard repexec it did not work. However, it stops on the first frame  (wtf)  Why? Similar situations have been covered elsewhere but I still just do not get it.
Here's the code - when it starts the scout is already animating. What do you think? I know this is going to be something simple again. I shall steel myself.  :-D

Code: ags

function room_RepExec()
{
  ShakeScreenBackground(5, 2, 80); 
}

function repeatedly_execute_always()
{
  if (object[0].Frame == 39){    // alien scout already animating from room after fade in
    object[3].Animate(0, 5, eRepeat, eNoBlock);   ///    siren
    asiren.Play(eAudioPriorityNormal, eRepeat); 
    object[4].Animate(0,  15,  eOnce, eNoBlock);   // army
    }
    if (object[4].Frame == 13){
      object[5].Visible = true;      
      object[5].Animate(0, 10, eOnce, eNoBlock);    // army lining up to fire
      if (object[5].Animating){
        Display("attacking!");       // I know it's animating because this shows
    }
    }
}

#6
I love them.  (laugh)

One of my favourites (probably everyone's) is Double Fine Adventure! Schafer really grows on you; very bright and cheerful - but tough! Watched it five times and will watch again. Also Indie Game the Movie: riveting stuff. Atari: Game Over - a wacky love fest. Game Loading I found inspirational in a cool way. Any others?

I really want to see The Art Of The Game but I can't get it anywhere.

I can't recommend Double Fine enough. Great TV dinner viewing.
#7
Hi, I can add code if required but I think this is a very simple question that I am momentarily stumped on. I have two animated objects. One is a non player character character, let's say a clown,  the other is a radar scope. The clown is animated in one location  dancing on the spot, I can move the radar scope (a 50x50 square) around the screen using setPosition. Trouble is if I place the radar scope on the clown it appears underneath when it should be on top. Is this a zorder thing, or a enoblock? In a nutshell, if I set the radar scope at the location of the clown how can I make sure it appears on top? Hopefully this is a nice easy question for someone enjoying a croissant and a nice cup of coffee.  ;)
#8
Hi, and audioclip and audiochannel question! (boom (sound effect))  :)

I have a cannon firing and someone digging. Both are animated and start on fade in of the room.
I have the sounds in the function room_RepExec() part of the room code. The digging has 7 frames, every frame 0 I have a digging sound, a shovel. The cannon has 16 frames and fires every frame 14. The animations run at different speeds.

Code: ags
function room_AfterFadeIn()
{
  object[0].SetView(11);     // This is the digger
    object[0].Animate(0, 4, eRepeat, eNoBlock);
  object[1].SetView(12);    // This is the cannon
    object[1].Animate(0, 8, eRepeat, eNoBlock);
}

function room_RepExec()
{      
  if (object[0].Frame == 0){
     ashovel.Play();    
  }
  if (object[1].Frame == 14){
     aveggun2.Play();
  }


Basically the issue is quite simple and I know it probably has an easy solution but I just haven't found it - the digging sound blocks out the cannon boom. My understanding is that both sounds are probably playing on the same audio channel, so, my question is - can I assign a sound to a particular audiochannel like:

Audiochannel 1 assign dig
Audiochannel 2 assign cannon?

or from something I have seen:

AudioChannel *dig;
AudioChannel *cannon;


// and later

  if (object[0].Frame == 0){
    dig = ashovel.Play();   
  }
  if (object[1].Frame == 14){
    cannon = aveggun2.Play();
}


I tried this and it didn't work. Do I have the theory right? Any help more than gratefully received.  :)
#9
Hi,

I am brand new to this so please be understanding.  :)

I have a room with an animation of 7 frames with 5 second delay on erepeat, enoblock. The animation works fine. I also have a health bar. Initially, I would like every time frame 5 comes round for 10 points to be knocked off the health bar so that decreases say from 150 down to 10 at which point the player gets knocked back to a previous room. I have read the manual and looked through the forums, I still don't know how best to achieve this. I have tried so many different things that I am shy at putting code up because there are so many versions of it. I am sure this is easy to achieve. Any ideas would be very much appreciated.
Once I can do the basics I would like for the 10 points to be knocked off randomly so at each cycle it's hit or miss if the reduction happens. In fact I would ideally like for successful random hits to happen in any of three frames - say 1, 3 and 6 of frames 0 through 7 occur. I would also have random hit sounds.
While this happens the player has to achieve something to stop the attack and win. This I can do.

Many thanks. This is my first post. Hi!  8-)


SMF spam blocked by CleanTalk