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

#161
Hello,

You could do this:

-Create a global int: flag = 0
-Create the first item in room 1 and set it to visible
-Create the second item in room2 and set it to Invisible
-On the first item 'interact event' just make it invisible and set flag to 1

Code: ags

 obj1.visible = fasle;
 flag =1; 


Now in the room2 'entersroomafterfadein' event just put:

Code: ags

if (flag == 1)
{
 obj2.visible = true;
}


Something like that would do?
#162
Back from the grave to say this is looking pretty good, there's a real old school/scooby doo feel to it, I really want to play this one.

Now for the childish comment:

Am I the only one to be troubled by THIS in the screenshots?

Sorry but it made me laught so 'hard' I couldn't help but post...
#163
Critics' Lounge / Re: Background and palette
Fri 25/06/2010 18:27:04
What you told me just makes sense, and is great help since most of the things I do are kinda random for the details/shading.
I think this time it looks a bit better:


I treid to add a quick shadow to the back wall and changed a few colors, I still need to adjust some of them. Also tried to "break" some straight lines.

The first pic was my limit, I couldn't really find a way to make it more realistic and improve, I appreciate the help, no forcing here ^^
The left part is just here for test btw, and yeah Sephiroth FTW!  ;D

*Tu serais pas francais par hazard?
#164
Critics' Lounge / Re: Background and palette
Fri 25/06/2010 12:48:45
You explained it well, but I just realised, I hope i got it right this time.
Edited the pic, I will have more time to work on it when I get back home though. Thanks :)
#165
Critics' Lounge / Re: Background and palette
Fri 25/06/2010 12:01:55
Monsieur OUXX: Aye that's a really nice technique about setting up a night scene, exactly what I needed.
Im trying my best to make it look decent at least, but usually trying randomly until I get something good, this will save me a lot of time, thanks :)

As I said this is the first background so i need to get things clear before i start drawing more, one thing I wanted to say is I love the colors you used in the paintovers! I intend to make another city in a desert/sand area like South America or Spain and it will look awsome for this kind of settings, but this city is a post-apocaliptic setting meaning it's too colorfull not that it looks bad of course ;)

The light source: I didnt think it would be that important, maybe I should consider something like this and start working on colors/gradient from there?



Thank you for the paintovers, I learned a lot and will try to work on that!

*Edited picture to swap colors and add some highlights.
#166
Critics' Lounge / Re: Background and palette
Fri 25/06/2010 09:01:26
Thanks for the pointers! The top left corner and strange color on floor  were just tests for shadows. (I have no idea if i should draw them).
Yes this is a night scene and it should be dark somehow.

Everytime i try to get a new color it just looks to bright or too colorful if you see what I mean  ^^
This is what i have now, tried to use blue colors since its at night and I think it somehow improved, even slightly... I included some sprite to see if it fits the style.



Im very limited in term of skills and creativity so this is why any idea would help me a lot.
#167
Critics' Lounge / Background and palette
Thu 24/06/2010 01:00:27
Hi, I was off for a while and decided to come back and work more seriously on a project. So here is the first background I came up with:



I would love some help on colours, it is so greyish it almost look like a flashback scene... which is not what I want. I think the colors for the door and shutters are good but I couldnt find a matching color for the rest.

Any crit or help is welcome, thanks!

#168
I've played throught the demo and I liked the atmosphere a lot, the puzzles made sense. Aside from the small hotel bug I told you about (pm) there's no major one. Plus I love stories with nicknames like these and first person view when a conversation starts, this is a really nice touch!

Spoiler
The first scene with the bum, the appartment and the girl was cool but when I talked to the big boss he just said good job thats it
[close]
I hope you can develop more of the story soon, keep it up.
#169
QuoteOne of the most beneficial changes that could be made in this respect is if we could have pointers to custom structs which would open up whole new doors as far as the possibilities.

Operators support on custom types would help here, but I like how I can get the struct filled as a return value instead of having to deal with arrays and pointers this way I'm not restricted to one type as a return value and each of the function can 'return' a custom struct, in the example I did 'ex1' is a temp buffer to hold the return values, you can save the data it contains into other vars or use it in checks.

The problem is passing it directly as argument but it works as a retrun value holder to me.

-Regards
#170
Yeah right, member function will do, I don't know why we can't assign 2 struct variables of the same type  :-\
Same as passing a custom struct as a parameter I guess, sadly... 

But you could still do:

Code: ags

ex2.coord_x = ex1.coord_x;


Or directly use ex1 as in:
Code: ags

SetPosition();
Draw(ex1.Name, ex1.coord_x, ex1.coord_y);

Wait(100);

SetPosition();
Draw(ex1.Name, ex1.coord_x, ex1.coord_y);



Heh okay I thought he was talking about mine, sorry ;)
#171
Actually you 'return' a struct, so it could contain an array of int (e.g for tiles), a string, a bool and anything you define into one var. This is what I'm using for Tileset, Magics, Loots Tables structures in my code. But maybe monkey_05_06 's example is better, depends on the context and needs I think.

-Regards
#172
What if you use ex1 as a global return value like I did and then use this whenever you create another 'example':

Code: ags

Example ex2;

ReadStuff();
ex2 = ex1;

Example ex3;

ReadStuff();
ex3 = ex1;


Would that work?

Edit: Yeah it was cEgo.Say when I wrote it, then I just changed to display, sorry. Btw I'd love to see an update so we could use this instead: Example ex1 = ReadStuff(); heh.
#173
It sounds nice, loops well, not overloaded with too many instruments and nothing seemed out of place. I liked the piano solo (1:02).
It could set up a nice atmosphere, what I imagined when I listened to it was something happy, some kind of journey throught sunny colorful lands. Or a major city background music, like the native town of the hero in some rpg, because it has a good rpg feel. One word: Clean.
#174
Sorry if I'm wrong but I thought the variable scope would allow you to do something like this to simulate a "return several values":

Code: ags

struct Example {
String Name;
int coord_x;
int coord_y;
};

/* --------------- */

Example ex1;

function ReadStuff()
{
 //blabla
 ex1.Name    =  char.Name;
 ex1.coord_x =  char.X;
 ex1.coord_y =  char.Y;
}

ReadStuff();
Display( "My name's %s and I'm standing at X:%d / Y:%d .", ex1.Name,  ex1.coord_x,  ex1.coord_y );



You can modify a global var inside a local scope, so you can return as many values as you want if you simply fill up a struct that contains all the return values you need. Maybe you already know that and just wanted to check if a reference would work, anyways I hope it helps a bit.
#175
Identing might help seeing your syntax errors, you just forgot some braces (said brackets) :

Code: ags

function Dwarf_UseInv()
{
  if(player.ActiveInventory==iLeaves)
  {
    Jason.Walk(236, 84, eBlock);
    Dwarf.Say("&48 Uh.. I don't smoke.");
  }
  else if(player.ActiveInventory==Fishstick)
  {
    Jason.Walk(236, 84, eBlock);
    Dwarf.Say("&49 No thanks. I don't like sushi, It's bad for my stomach.");
  }
}


I bet NsMn will have something to say to you ;)
#176
I guess you could use an invisible object with only the eyes or mouth as graphics, setting its baseline so it overlaps, then assuming the offset of the eyes compared to the sprite's top-left pixel is (20,20) you could draw/animate it over your character sprite:

Code: ags

object.x = Character.X + 20; 
object.y = Character.Y + 20;
object.Baseline = screen_height;
object.SetView(eyesonly_view); 
object.Visible = true;
object.animate(loop, delay);
Object.Visible = false;


Or maybe use graphical overlays like this:

Code: ags

int i = first_sprite_slot;
while( i <= last_sprite_slot)
{
  Overlay  *Over1 = Overlay.CreateGraphical( Character.X + 20, Character.Y +20, i,  true);
  Wait(1 * 40); //1 sec delay
  Over1.Remove();
  i++;
}


Character.SetIdleView is the olny thing we have, no OnIdle event so you'll have to run the code manually when you need, otherwise use the classic way with the same sprite size. But i don't think it really wastes "that" much memory resources imho, would just make the executable bigger if this is what you meant ;)
#177
Right twentyfour, but I thought the right leg (on the front sprite in your pic) was the one forward like he just landed his right foot on the ground. The left shoe is bigger than the right one I think this is what's confusing me.

Just one more thing, the legs in the sidewalk may be a bit too flexible but it's not really an issue.
Here is a walcycle tutorial picture I found on the forums (can't remember who posted it tho, sorry) I think it could be useful:

#178
Hi, I'm not really experimented with animations and these are just some ideas to improve the front anim, I think it could use some arms/shoulders movement, even if it only moves by one pixel, also the legs didn't look like they were moving so I tried something on this frame:



I hope it helps.
#179
Thanks Pumaman, I knew there was a more simple way but couldn't find it, I hadn't seen it in the label properties treeview.
Quoteinstead of messing around with the gui.Controls[] array.
Sorry, I just started using AGS, at least I've learned something useful ;)
#180
It got me thinking, and I may have a workaround if there's nothing already implemented to do this.

You could create a Gui with one label.
All you'd have to do now is to create a global string UserInput and copy this in the on_key_press section of the global script.

Just replace YourLabel with the ScriptName property of the label.

Code: ags


 if(gGui3.Visible == true)
  {
    int size = UserInput.Length;

    String str2 = YourLabel.Text;
    
    if( keycode == eKeyBackspace && UserInput.Length > 0 )
    {
     UserInput = UserInput.Truncate( size -1 );
     str2 = str2.Truncate( size -1 );
    }

    else if( keycode >= eKey0 && keycode <= eKeyZ)
    {
     UserInput = UserInput.AppendChar( keycode );
     str2 = str2.AppendChar( '*' );
    }

    else if( keycode == eKeyReturn )
    {
      if( UserInput != "BIGBLUECUP" )
      {
        //display a "WRONG PASSWORD" message
      }
      else
      {
        //password matched so do whatever you need.
      }
    }
    YourLabel.Text = str2;
  }

All the letters that are typed will be uppercase, but it could be changed with a few more lines of code.

I also wanted to do this to check what the user's typing letter by letter, but you don't have to use textboxes, a simple label could do.
Edit: Ahh the font trick beats me :)
SMF spam blocked by CleanTalk