Search found 1110 matches

by sheamkennedy
Sun Jan 11, 2015 4:27 pm
Forum: Game Discussion
Topic: tips for making an Atari2600 style game?
Replies: 85
Views: 13031

@Urkel:

Thanks this may help. In your code where is "bullet" and "2" defined within your code or within your game engine?
by sheamkennedy
Sun Jan 11, 2015 4:48 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

Apparently you parented the bullet to the container of the hero and not the visible walkabout component? But! Now that we know where it is, a LookUpSlice ( sli:Bullet1,GetHeroSlice (0) ) Oughta find the first (And in this case, only) slice attached to the her...
by sheamkennedy
Sun Jan 11, 2015 4:22 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

Upon further inspection of the slice tree it would seem that the Bullet is not a child of the hero but rather a sibling. Although I can't understand why... I had parented the bullet to the hero, thus the bullet should be the heros child.
by sheamkennedy
Sun Jan 11, 2015 3:55 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

I feel like I've made some progress but I'm still getting an undesired result. Could you look at my code to see if I'm making a mistake. I have changed the script so the Bullet is a child of the hero, and the hitbox is the child of the NPC. Then I compare the first child of hero and of NPC to check ...
by sheamkennedy
Sun Jan 11, 2015 2:58 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

I tried further to figure this out. I believe you are right. I have loaded my stuff in the form of collections. All my hitboxes in one collection. Bullets others. Perhaps I should give all parts of my code to clarify things. I'm almost considering making a simple shooting game from scratch so I don'...
by sheamkennedy
Sun Jan 11, 2015 1:56 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

Alright so I took your advice and made a small code to see if the slices existed. Here's the code I used to check it: if(key is pressed(key:O)) then( stop slice (lookup slice(sli:Bullet1)) stop slice (loo...
by sheamkennedy
Sun Jan 11, 2015 12:55 am
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

So I think this is what you mean: script, checkCollisions, begin if ((slice is valid(LookUpSlice (sli:Hitbox1)) && slice is valid(LookUpSlice (sli:Bullet1))) == true) then(...
by sheamkennedy
Sat Jan 10, 2015 8:58 pm
Forum: Game Discussion
Topic: Invalid Slice Handle Error during collision test
Replies: 10
Views: 1650

Invalid Slice Handle Error during collision test

In search of quicker help I am reposting this problem in it's own thread: I wrote up what I think to be a simple collision test to see if my slice collision works. It looks like so: script, checkCollisions, begin if (SliceCollide (sli:Hitbox1, sli: Bullet1)&a...
by sheamkennedy
Sat Jan 10, 2015 8:26 pm
Forum: Game Discussion
Topic: tips for making an Atari2600 style game?
Replies: 85
Views: 13031

Alright I'm back from vacation and still struggling a bit. I wrote up what I think to be a simple collision test to see if my slice collision works. It looks like so: script, checkCollisions, begin if (SliceCollide (sli:Hitbox1, sli: Bullet1)) then &am...
by sheamkennedy
Sat Dec 20, 2014 7:08 pm
Forum: Game Discussion
Topic: tips for making an Atari2600 style game?
Replies: 85
Views: 13031

#Creates a variable and sets it to the slice ID of the enemy that our shot #has hit, or 0 if nobody's been hit. In a game, I'd probably check this #for each shot. variable (HitHelper) HitHelper := FindCollidingSlice (Enemies,Shot) #If you hit something... If ...
by sheamkennedy
Sat Dec 20, 2014 6:45 pm
Forum: Game Discussion
Topic: Problem: Bullet slices not originating from hero pixel (x,y)
Replies: 9
Views: 1756

Spoonweaver wrote:Set isShooting as a global variable not a local one like you have here.
Wow I'm so silly. Thanks now it works great. No need for timers either.
by sheamkennedy
Sat Dec 20, 2014 6:32 pm
Forum: Game Discussion
Topic: Problem: Bullet slices not originating from hero pixel (x,y)
Replies: 9
Views: 1756

As far as making your code allow only one bullet at a time. That's so simple it's startling you'd ask. You set a tag or variable on when the bullet is there and off when it disappears. While having the variable/tag control whether the player can shot or not. Oddly enough I think that's exactly what...
by sheamkennedy
Sat Dec 20, 2014 6:28 pm
Forum: Game Discussion
Topic: Problem: Bullet slices not originating from hero pixel (x,y)
Replies: 9
Views: 1756

set parent(sl, lookup slice(sl:walkabout layer)) This command will reparent the bullet so that instead of being attached to the screen, it will be attached to the map. Then its coordinates will be equivalent to the hero's pixel coordinates Thanks that seems t...
by sheamkennedy
Fri Dec 19, 2014 5:19 pm
Forum: Game Discussion
Topic: Problem: Bullet slices not originating from hero pixel (x,y)
Replies: 9
Views: 1756

Problem: Bullet slices not originating from hero pixel (x,y)

I've kind of been thinking about adding projectiles in to my game. I decided to do a simple bullet which is supposed to originate from the hero's pixel x, and pixel y position before flying off in to the distance. It seemed to be working fine but I just realized that when I move away from the top le...
by sheamkennedy
Fri Dec 19, 2014 4:20 pm
Forum: Game Discussion
Topic: How do I code a hero to face certain direction on keypress..
Replies: 3
Views: 854

Thanks, I didn't know about that resource. It looks like there's a lot of useful stuff there.