Page 1 of 1

New guy here! Help please.

PostPosted: Sun Apr 08, 2007 11:31 am
by d-soldier
Alright, I've been playing with this thing all day long now, and several times I've been stumped (but being as impatient as I am)downloaded all of your games to disect in an attempt to find my answers, rather then waiting for a forum response... But now I need help, so thanks in advance!

1)If I had a tile'able background image that I wanted to scroll from one direction to another and SEAMLESSLY repeat itself, how would i do that? (Found something similar in the carrot shooter game, but I couldn't get it to work with my project correctly...)
2)While playing with the ABUSE2 source, I could not figure out why the player(actor) shooting his weapon depended on an action link(?) connecting him to the background image and map-walls image? Anyone? And where can I locate that string of code to change it to another actor? And if that background image is setup as one of the huge tiled messes, why wont it let me switch it back to a normal untiled image ???

It's a bit overwhelming for a day-one guy, thats for sure... Thanks again to anyone who takes the time to help!

Re: New guy here! Help please.

PostPosted: Sun Apr 08, 2007 1:26 pm
by makslane
d-soldier wrote:While playing with the ABUSE2 source, I could not figure out why the player(actor) shooting his weapon depended on an action link(?) connecting him to the background image and map-walls image?


It's just a trick thats uses the background like a sensor to catch the clicks.
After receive a Mouse Button Down event, the background actor sends an activation event to the copTop actor. When the copTop receives the activation event, creates the laserShot actor at the right position.

Now, take a look in the 'Create Actor' event of the laserShot. In this event, the actor will sets the direction and velocity and plays a sound.

Anyone?And where can I locate that string of code to change it to another actor?


I think there is only a player in the game.

And if that background image is setup as one of the huge tiled messes, why wont it let me switch it back to a normal untiled image ???


You need to erase the tiles before get a normal actor again (hold the right shift while drawing)

Re: New guy here! Help please.

PostPosted: Sun Apr 08, 2007 1:28 pm
by makslane
d-soldier wrote:If I had a tile'able background image that I wanted to scroll from one direction to another and SEAMLESSLY repeat itself, how would i do that?


You put a path in the actor.

Re: New guy here! Help please.

PostPosted: Sun Apr 08, 2007 6:43 pm
by d-soldier
[quote="makslane"]
I think there is only a player in the game.
[/quote]
Your right, I worded that all wrong... Okay, so the backdrop is set up under the actor properties to"tile" then "tile matching" which caused multiple instances of itself to be assemebled and overlayed (I cant select or delete them) and I have found no way to get this actor back to a single image of itself.
Therefore I would like to take the activation link that goes from the player(actor) to the mishapen background, and have it go to something else (a background that is not all fubar). I would simply delete it and start a new one from scratch to my desired background, but I cant find the code for it either. (because I'm new and ignorant no doubt), but I've seriously looked. :lol: Thanks to both of you who responsed.

PostPosted: Sun Apr 08, 2007 7:12 pm
by makslane
Click with right mouse button over the activation line to remove.

PostPosted: Sun Apr 08, 2007 7:30 pm
by Sgt. Sparky
here is the code for my SamuraiDude game,
it allows you to pick between 2 players by just changing one variable.
"Select"
in the menu you change character select.
aftwer you press enter if you have one of the 2 character options selected it will set characterselect to select.
here is the draw actor code:
Code: Select all
char*key=GetKeyState();
if(Select == 0)
{
yvelocity += 1;
if(SLASH == 0)
{
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 0)
{
    gs = 0;
    if(j == 0)x -= 5;
    if(j == 1 && xvelocity > - 5 && hw == 0)xvelocity -= 1;
    if(af == 1 && key[KEY_DOWN] == 0 && j == 0)
    {
        ChangeAnimation("Event Actor", "WL", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 0 && j == 1)
    {
        ChangeAnimation("Event Actor", "JL", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 1 && j == 0)
    {
        ChangeAnimation("Event Actor", "CL", FORWARD);
        af = 0;
    }
}
if(key[KEY_LEFT] == 0 && key[KEY_RIGHT] == 1)
{
    gs = 1;
    if(j == 0)x += 5;
    if(j == 1 && xvelocity < 5 && hw == 0)xvelocity += 1;
    if(af == 1 && key[KEY_DOWN] == 0 && j == 0)
    {
        ChangeAnimation("Event Actor", "WR", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 0 && j == 1)
    {
        ChangeAnimation("Event Actor", "JR", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 1 && j == 0)
    {
        ChangeAnimation("Event Actor", "CR", FORWARD);
        af = 0;
    }
}
}
if(key[KEY_UP] == 1 && j == 0 && SLASH < 2)
{
    if(gs == 0)ChangeAnimation("Event Actor", "JL", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "JR", FORWARD);
   PlaySound2("data/jump2.wav", 0.555556, 1, 0.000000);
    yvelocity = - 15;
    j = 1;
}
if(key[KEY_SPACE] == 1 && SLASH == 0 && j == 0)
{
    PlaySound2("data/Swipe1.wav", 0.211111, 1, 0.000000);
    if(gs == 0)ChangeAnimation("Event Actor", "SLL", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "SLR", FORWARD);
    SLASH = 1;
}
if(key[KEY_SPACE] == 1 && SLASH == 0 && j == 1)
{
    PlaySound2("data/Swipe1.wav", 0.211111, 1, 0.000000);
    if(gs == 0)ChangeAnimation("Event Actor", "!JLSpiral", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "!JRSpiral", FORWARD);
    SLASH = 1;
}
if(SLASH == 2 && animpos > 3)
{
    if(gs == 0)ChangeAnimation("Event Actor", "SL", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "SR", FORWARD);
    SLASH = 0;
}
if(yvelocity > 4)j = 1;
if(yvelocity < -3)j = 1;
if(Health <= 0)
{
    Life_Count -= 1;
    PlaySound2("data/click.wav", 0.255556, 4, 0.066667);
    x = Spawnpoint.x;
    y = Spawnpoint.y;
    Health = 18;
    CreateActor("effect1", "Effect2", "(none)", "(none)", 0, 0, false);
}
if(Life_Count < 0)
{
 directional_velocity = 0;
 SLASH = -1;
 transp = .999;
 ChangeAnimationDirection("Event Actor", STOPPED);
}
if(sentryCount.textNumber == 0)
{
    if(distance(xscreen, yscreen, portal.xscreen, portal.yscreen) < 400)
    {
        if(yscreen < portal.yscreen)yvelocity += 1;
        if(yscreen > portal.yscreen)yvelocity -= 2;
        if(xscreen > portal.xscreen)xvelocity -= 1;
        if(xscreen < portal.xscreen)xvelocity += 1;
    }
}
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 1)
{
    if(gs == 1 && af == 1)
    {
        ChangeAnimation("Event Actor", "SR", FORWARD);
        af = 0;
    }
    if(gs == 0 && af == 1)
    {
        ChangeAnimation("Event Actor", "SL", FORWARD);
        af = 0;
    }
}
}
if(Select == 1)
{
yvelocity += 1;
if(SLASH == 0)
{
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 0)
{
    gs = 0;
    if(j == 0)x -= 5;
    if(j == 1 && xvelocity > - 5 && hw == 0)xvelocity -= 1;
    if(af == 1 && key[KEY_DOWN] == 0 && j == 0)
    {
        ChangeAnimation("Event Actor", "NL1", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 0 && j == 1)
    {
        ChangeAnimation("Event Actor", "NJL1", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 1 && j == 0)
    {
        ChangeAnimation("Event Actor", "NLC1", FORWARD);
        af = 0;
    }
}
if(key[KEY_LEFT] == 0 && key[KEY_RIGHT] == 1)
{
    gs = 1;
    if(j == 0)x += 5;
    if(j == 1 && xvelocity < 5 && hw == 0)xvelocity += 1;
    if(af == 1 && key[KEY_DOWN] == 0 && j == 0)
    {
        ChangeAnimation("Event Actor", "NR1", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 0 && j == 1)
    {
        ChangeAnimation("Event Actor", "NJR1", FORWARD);
        af = 0;
    }
    if(af == 1 && key[KEY_DOWN] == 1 && j == 0)
    {
        ChangeAnimation("Event Actor", "NRC1", FORWARD);
        af = 0;
    }
}
}
if(key[KEY_UP] == 1 && j == 0 && SLASH < 2)
{
    if(gs == 0)ChangeAnimation("Event Actor", "NJL1", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "NJR1", FORWARD);
   PlaySound2("data/jump4.wav", 0.555556, 1, 0.000000);
    yvelocity = - 17;
    j = 1;
}
if(key[KEY_SPACE] == 1 && SLASH == 0 && j == 0)
{
    PlaySound2("data/Swipe1.wav", 0.211111, 1, 0.000000);
    if(gs == 0)ChangeAnimation("Event Actor", "NLSS1", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "NRSS1", FORWARD);
    SLASH = 1;
}
if(key[KEY_SPACE] == 1 && SLASH == 0 && j == 1)
{
    PlaySound2("data/Swipe1.wav", 0.211111, 1, 0.000000);
    if(gs == 0)ChangeAnimation("Event Actor", "NJSL1", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "NJSR1", FORWARD);
    SLASH = 1;
}
if(SLASH == 2 && animpos > 2)
{
    if(gs == 0)ChangeAnimation("Event Actor", "NLS1", FORWARD);
    if(gs == 1)ChangeAnimation("Event Actor", "NRS1", FORWARD);
    SLASH = 0;
}
if(yvelocity > 4)j = 1;
if(yvelocity < -3)j = 1;
if(Health <= 0)
{
    Life_Count -= 1;
    PlaySound2("data/click.wav", 0.255556, 4, 0.066667);
    x = Spawnpoint.x;
    y = Spawnpoint.y;
    Health = 18;
    CreateActor("effect1", "Effect2", "(none)", "(none)", 0, 0, false);
}
if(Life_Count < 0)
{
 directional_velocity = 0;
 SLASH = -1;
 transp = .999;
 ChangeAnimationDirection("Event Actor", STOPPED);
}
if(sentryCount.textNumber == 0)
{
    if(distance(xscreen, yscreen, portal.xscreen, portal.yscreen) < 400)
    {
        if(yscreen < portal.yscreen)yvelocity += 1;
        if(yscreen > portal.yscreen)yvelocity -= 2;
        if(xscreen > portal.xscreen)xvelocity -= 1;
        if(xscreen < portal.xscreen)xvelocity += 1;
    }
}
if(key[KEY_LEFT] == 1 && key[KEY_RIGHT] == 1)
{
    if(gs == 1 && af == 1)
    {
        ChangeAnimation("Event Actor", "NRS1", FORWARD);
        af = 0;
    }
    if(gs == 0 && af == 1)
    {
        ChangeAnimation("Event Actor", "NLS1", FORWARD);
        af = 0;
    }
}
}

it is really big, but it is easier than adding 25+ different things for one key down event,
this way it makes a way to have 0 moonwalks.
the basic thing I am trying to say is:
you can just set it up to change animations and do slighy different things depending on what select is.
example:

if you wanted to make your actor change animation to left,
Code: Select all
if(Select == 0)ChangeAnimation("Event Actor", "Left_1", FORWARD);
if(Select == 1)ChangeAnimation("Event Actor", "Left_2", FORWARD);

got it? :D

my problem

PostPosted: Sun Apr 08, 2007 10:21 pm
by d-soldier
.... See, for me, uh... I need to invest more time with basic stuff and familiarize myself with the functions on a basic level. You guys say stuff like "add a variable" and my brain says "wheres that? Which actor needs to be selected? What do I do to get to a place to do that?"... So let me read more and play around more, and then when I'm not wasting everyone's time due to my ignorance, I'll start hitting people up again with more questions (no doubt). Thanks for trying though!

PostPosted: Mon Apr 09, 2007 12:37 am
by Sgt. Sparky
to make an variable:
when you are editing code click on the variables button. :D
it will open a window where you can make stuff. :)
if you need any help on anything let me know :D

PostPosted: Mon Apr 09, 2007 6:52 am
by Troodon
Welcome to the forums d-soldier! :D

...

PostPosted: Mon Apr 09, 2007 8:18 am
by d-soldier
Thank you Tekdino, So far everyones been a big help. Since I got a welcome, I'll go ahead and introduce myself a bit! I'm 26, in California, and my aspirations regarding GE nothing beyond Metal Slug'esque shoot-em-ups. For the last two days I've been reading the forums, running tutorials, and disecting all of your demos to try to figure this program out (which is priced very well I might add). My real hobby is graphic design and illustration however (see website below) so you can expect if I post anything on here that it will be a beautifully graphiced game (not mere block tiles) and WILL exceed the 2 meg limit.
And thats about it, I'm very impressed with the software, and I've barely broken the ice. And again, thanks to all to help me out along the way in advance!

D-Soldier
http://www.d-s-designs.com

PostPosted: Mon Apr 09, 2007 9:15 am
by Troodon
I've got answers to my questions many times the same day I posted, so activate the 'notify me when a reply is posted'. :D
If you want to ask something small quickly, you can also send me an email in
mike.touati @gmail.com.
If I'm online, I will answer you directly in some minutes. If you want, I can also give you an invitation to gmail and we could chat.

I normally like helping newbies because I was helped well in this forum. I for example helped the members 'The Achievement' and 'Unigamer' in start. :)

PostPosted: Mon Apr 09, 2007 6:46 pm
by Sgt. Sparky
tekdino wrote:I normally like helping newbies because I was helped well in this forum. :)

Same Here! :D

Re: New guy here! Help please.

PostPosted: Sun Jul 06, 2008 5:46 pm
by tlah
d-soldier wrote:1)If I had a tile'able background image that I wanted to scroll from one direction to another and SEAMLESSLY repeat itself, how would i do that? (Found something similar in the carrot shooter game, but I couldn't get it to work with my project correctly...)

go to the background images's actor control (rightclick, actor control) go up to the top of the window that opened up. on the top right, there is something that says normal. select x infinite if you want it to go on forever from left to right, or y infinite if you want it to scroll up to down forever.