Jump to content


Shawtrcwbky

Member Since 20 Nov 2010
Offline Last Active Feb 19 2013 08:29 AM

Topics I've Started

[Request]Cartoonish animated electric eel sprite

18 October 2011 - 04:57 PM

Image Description: Electric Eel, snake-like fish that can release electroshocks.
Size :Under 64x32 (keep in 2:1 ratio if smaller)
2D or 3D: 2D, platformer.
Facing direction or pose: Facing is not important, 'pose' should be swimming.
Style :Similar to Jazz Jackrabbit series, http://www.majhost.c...jj2-enemies.png
Animated? Yes. 2 animations if possible. One is swimming and the other one is releasing electricity(should be like, getting the view of it's skeleton every few frames)
If you need any more information just ask, thanks in advance :)

[Simple request] TD view of Rainbow Sheep

01 September 2011 - 09:37 AM

Posted Image
I'd love you if you do this for me. Like the thread says, I need top-down view of this thing. Credits, as always are given.
Note: Feel free to shift the colors. It's back should not be all red.

[solved]Moving 'elevator' can only move down

25 August 2011 - 08:51 PM

Okay so, I'm trying to make a thing such as elevator. When player enters it, he can't exit it until the ride ends(logically). I already have moving platform programmed and it works perfectly. I've got a confusing chain of parent objects ,elevator's parent is object platform and platform's parent is object block. Let's say they are called o_elevator, o_platform and o_block. Both o_platform and o_block have no events nor actions, but player object has collision event with them.
For collide event with o_block
if (!place_free(x+hspeed,y))
{
    if (hspeed<=0){move_contact_solid(180,abs(hspeed));}
    if (hspeed>0){move_contact_solid(0,abs(hspeed));}
    hspeed=0;
}
} 
if (!place_free(x,y+vspeed))
{
    if (vspeed<=0){move_contact_solid(90,abs(vspeed));}
    if (vspeed>0){move_contact_solid(270,abs(vspeed));djump=1}
    vspeed=0;
}
For collide event with o_platform:
if (y-vspeed/2<=other.y) {
    
    if (other.vspeed>=0) {
        y=other.y-9;
        vspeed=other.vspeed;
        djump=1;
    }
    
    onPlatform=1;
    djump=1;
}
Now for the elevator object. I have 2 objects. One is o_elevator and another one is o_elevatorBlocker. o_elevatorBlocker blocks player from leaving it. It is solid and it's parent is o_block and it follows o_elevator.
What I forgot to say is that when elevator 'sees' a skeleton, it stops until the skeleton explodes (yay for suicidal skeletons). So here's the code.
Step event for o_elevator:
if distance_to_object(instance_nearest(x,y,bombSkeleton)) <= 200 && distance_to_object(bones) <= 160 && 
collision_rectangle(x ,y+64 ,instance_nearest(x,y,bombSkeleton).x ,y-64 ,instance_nearest(x,y,bombSkeleton) ,1 ,1 )
{
vspeed = 0;
}
//for some weird reason, ELSE refuses to work here, so I reversed it
if distance_to_object(instance_nearest(x,y,bombSkeleton)) >= 200 && distance_to_object(bones) >= 160 && 
!collision_rectangle(x ,y+64 ,instance_nearest(x,y,bombSkeleton).x ,y-64 ,instance_nearest(x,y,bombSkeleton),1 ,1 )
{
    if alarm[0] = -1
    {
    alarm[0] = 5; 
    }
}
if (!place_empty(x,y+vspeed+yspeed)) {
    if (vspeed!=0) {
        yspeed=-vspeed;
        vspeed=0;
    }
    else {
        vspeed=-yspeed;
        yspeed=0;
    }
}
if (place_meeting(x,y-2,player)) {
    player.y+=vspeed+yspeed;
    with (player) {
        if (place_free(x+other.hspeed,y)) player.x+=other.hspeed;
    }
}

if (vspeed<0) {
    yspeed=vspeed;
    vspeed=0;
}
if (yspeed>0) {
    vspeed=yspeed;
    yspeed=0;
}
And the most important thing, alarm[0]:
vspeed = -1;
Now this should send elevator UP if there's no skeletons around, but no matter what I do, it sends it down to oblivion. I tried reversing it to "vspeed = 1", hopefully being the way it should, but the result is same.

Alternate windows? (Side-window)

23 July 2011 - 08:43 PM

What's the easiest way to make a sidebar that is NOT inside the same window as the game? You know, like those sidebars that shows death counter, time spent, items found and such things.

Broken AI

20 July 2011 - 11:19 PM

AI Enemy stops moving after switching through sprite indexes.
//Create event
gravity = 0.4;
image_speed = 0.2;
hspeed = 2;
//Step event
if player.x > x
{
image_xscale = 1;
} else {
image_xscale = -1;
}

if distance_to_object(player) < 160 and bullet_delay = 0
{
sprite_index = sprTeacupManFiring ;
image_speed = 0.5;
hspeed = 0;
instance_create(x,y,projectile);
bullet_delay += 1;
} else {
sprite_index = sprTeacupMan
image_speed = 0.2
alarm[0] = 10 //alarm 0 contains "hspeed = 2"
}
if bullet_delay >= 30
{
bullet_delay=0
}
if bullet_delay!= 0
{bullet_delay += 1}
if place_meeting(x,y,stopEnemies) or place_meeting(x+2,y,block) or place_meeting(x-2,y,block)
{
hspeed *=-1 //if it collides with the wall, or the stopEnemies object, turn back
}
Enemy is naturally moving, when player enters enemies' "sight", enemy stops walking and starts shooting things. However, when the player leaves the area, the enemy changes from shooting animation to walking animation, but he is still static and that's the problem.