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

#1161
I had a puzzle with a rope in my game, I originally thought of manually animating the whole thing, but then I remembered this module, and it:
A. Looks much more impressive than what I had planned.
B. Took a lot less time.
C. Saved my life!

So I guess I just wanted to say thanks for this great module!
#1162
The Quest For The Holy Salsa

There is an on-going blood feud between the humans and the abominations.
You play as Eldritch, a young abomination, who is chosen by the 'High One' to infiltrate
the human camp, and fetch what the legend describes as their sacred item which is also the source to their power:
The Holy Crunchy Chunky Salsa!

In your quest, according to the legend (written in the book of the ancient war), you will have to overcome three obstacles:
The mighty guard, The angry farmers and the Test Of the Beards Of Different Sizes.
You will also discover the true power of love.

Backgrounds were made by the amazing Jakerpot.





Download (17.5MB)

P.S. Discordance, All of the requirements are met even before starting the game, I demand bonus points and a foot rub (I understand if you don't approve of the bonus points)  :P
#1163
Yes, use SayBackground.
#1164
Just replace it with the

if (keycode == eKeyHyphen)

in the previous script...
#1165
Not that I know of...
You can write an extender method for walk that will save the target x&y and then use it, but you'll have to remember using it in the entire game, and it can get complicated...
#1166
Ahh, you didn't copy my code correctly before...
Change
Code: ags

else if (gTask.Y < System.ViewportHeight) {

to
Code: ags

else if (gTask.Y < System.ViewportHeight - 1) {
#1167
There's a problem with that, because AFAIK there's a limitation in AGS that says you can't set the walkspeed of a character while he is walking.
I don't know of an easy way to make it to work... you can do it so that only if the character is not moving his walkspeed will change by changing ethan's code like this:
Code: ags

 function on_key_press(eKeyCode keycode) 
{
if (keycode == eKeyPlus && !cEgo.Moving)
  {
  cEgo.SetWalkSpeed(cEgo.WalkSpeedX + 1, cEgo.WalkSpeedY + 1); 
  }
  if (keycode == eKeyHyphen && !cEgo.Moving)
  {
  cEgo.SetWalkSpeed(cEgo.WalkSpeedX - 1,  cEgo.WalkSpeedY -1);
  }
}

Another thing you can do (but it can be quite irritating for the user) is to stop the character from moving and then change it's walkspeed, like this:
Code: ags

function on_key_press(eKeyCode keycode) 
{
if (keycode == eKeyPlus)
  {
  cEgo.StopMoving();
  cEgo.SetWalkSpeed(cEgo.WalkSpeedX + 1, cEgo.WalkSpeedY + 1); 
  }
  if (keycode == eKeyHyphen)
  {
  cEgo.StopMoving();
  cEgo.SetWalkSpeed(cEgo.WalkSpeedX - 1,  cEgo.WalkSpeedY -1);
  }
}
#1168
I honestly don't know, it depends where the problem is...
The ideal thing is for you to make a sample that illustrates the problem, and then upload the project (it doesn't have to be your game if that bothers you, just a sample) so I can download it, open with ags and debug to see the problem.
#1169
Wow, nice bg Jakerpot!
I hope you won't mind, I did some small touch-ups based on what I've learnt from Babar's tutorial, and I got this:





I feel that my art has really improved after reading this thread, thank you so much!
#1170
Hmmm, I used the exact same code and had no problems.
I don't see how adding a "return" statement after the tween will help, maybe you have something else going on there (maybe there's an invisible clickable gui blocking the screen or something of that sort)?
If you want to post a sample with the problem, I can try and solve it...
#1171
Code: ags

#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() 
{
    int ypos = (System.ViewportHeight - gTask.Height);
    if (mouse.y >= ypos) {
       if (gTask.Y != ypos) {      
          //GUI scrolls up
          gTask.TweenPosition(1.0, gTask.X, ypos, eEaseInTween, eBlockTween);
       }
    }
    else if (gTask.Y < System.ViewportHeight - 1) {
         //GUI scrolls down
         gTask.TweenPosition(1.0, gTask.X, System.ViewportHeight - 1, eEaseInTween,  eBlockTween);
    }
}
 
#sectionend repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
#1172
No offense taken :) , I actually used the same code myself for my GUI, I just posted from memory and didn't check myself...  

I actually prefer using the Tween Module though, because it makes experimenting easier regarding the timings, so actually I think it's less overhead then coding it yourself (if you are an experimenter)...
I also find that using a module is better in most cases because even something that looks simple can have caveats that you didn't think of and were probably handled in the module. This can save you precious time, which is more critical for me than efficiency for adventure games (obviously not the approach I would take for writing drivers or some real-time critical code)...
#1173
Yes, I was half correct, monkey is completely correct...
#1174
Yes, my bad, change this line:
Code: ags

if (mouse.y >= ypos) {


to this:
Code: ags

if (mouse.y >= ypos && gIconBar.Y != ypos) {


That should do it...
#1175
With the TweenPosition line you made the gui will go to (0,0) on every repeatedly execute (and then go down because of the other code), and that would explain gui "blinking".

You can do something like this:
Code: ags

function repeatedly_execute() 
{
    int ypos = (System.ViewportHeight - gIconbar.Height);
    if (mouse.y >= ypos) {
          //GUI scrolls up
          gIconbar.TweenPosition(1.0, gIconbar.x, ypos, eEaseInTween, eBlockTween);
    }
    else if (gIconbar.Y < System.ViewportHeight - 1) {
         //GUI scrolls down
         gIconbar.TweenPosition(1.0, gIconbar.x, System.ViewportHeight - 1, eEaseInTween,  eBlockTween);
    }
}
#1176
Yes, you can do it with the help of the wonderful Character Control Module which makes these kind of tasks simpler.
#1177
Oh, the pressure...  :-[
#1179
Quote from: ProgZmax on Mon 01/02/2010 05:33:48
All this and more could have easily been learned by using google.
Google? What's that?  :P

Seriously now, I am planning something, I hope I will complete it after I choked last month...
Jakerpot, sent you a pm.
#1180
Congrats  :)
Just fiddled with it for a bit and it seems to do the job nicely, I can see it being useful for pixel artists...
SMF spam blocked by CleanTalk