Search found 1110 matches

by sheamkennedy
Tue May 19, 2015 12:48 am
Forum: Q&A Discussion
Topic: Help using Read Map Block for animation
Replies: 6
Views: 1486

EDIT: Figured it out! I just added on this "+ get tile animation offset (animation pattern, layer)" to account for the animation frame if anyone was wondering. Thank you. So using the code you gave I was able to reveal that the animation tiles were always equal to 181, not 183. This is bec...
by sheamkennedy
Mon May 18, 2015 11:31 pm
Forum: Q&A Discussion
Topic: Help using Read Map Block for animation
Replies: 6
Views: 1486

Help using Read Map Block for animation

I am attempting to get the following script to work in my game. I have an animated set of tiles which is meant to look like a spike popping in and out of the ground. I only want this spike to harm the hero when it is out of the ground so I have made this script: script, harmSpike, begin if(r...
by sheamkennedy
Fri May 08, 2015 12:17 am
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

Cool, it'll be good to see the script. Also you should post a video or gif to show off the visuals if you have time to.
by sheamkennedy
Thu May 07, 2015 8:21 pm
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

Hmm that movesliceto function seems useful, I'll have to keep that in mind for my own game. Thinking further on this I think doing this mathematically may have some advantage. If for example you're making a tank game in which players take turns shooting projectiles through the air at one another the...
by sheamkennedy
Thu May 07, 2015 6:25 pm
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

Oh my bad, I got TMC and BMR mixed up. The guys with the 3-Letter names, I mix them up all the time.
by sheamkennedy
Thu May 07, 2015 5:50 pm
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

Yeah I assumed 2D coordinates too. My method will work for shooting enemies up on a hill, it just requires a collision detection script in the autorun script's while loop, which checks for collisions between the arrow and the enemy each tick. I think using a collision detection would make msw188's s...
by sheamkennedy
Thu May 07, 2015 5:00 am
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

Yeah it's the simplest way I know, I plan to continue using this concept for the rest of my own game. Another great thing about using a timer with phases is that you can increase the number of phases and update the arrow's sprite art each phase, thus making it look like the arrow is always tangentia...
by sheamkennedy
Thu May 07, 2015 2:20 am
Forum: Q&A Discussion
Topic: Arcing Projectiles
Replies: 24
Views: 6573

If you want a projectile to follow a perfect parabola there's a very simple (non-mathematical) way to do it. Say for example you want the "arrow slice" to move 5 tiles to the east following an arc. Just spawn an NPC who is invisible at the origin of where the arrow should start. Create the...
by sheamkennedy
Tue May 05, 2015 9:18 pm
Forum: Q&A Discussion
Topic: Help, I'm having a weird problem in my game
Replies: 9
Views: 2021

I would, only it's difficult with the way my games scripted. For example I need a script which shoots bullets from a player, then one which checks if that bullet collides with anything that can be killed and destroys the slice if necessary, then a timer that destroys the bullet if it's been on scree...
by sheamkennedy
Mon May 04, 2015 5:24 am
Forum: Q&A Discussion
Topic: Help, I'm having a weird problem in my game
Replies: 9
Views: 2021

Actually my script does use global variables for zeroing freed slices and each of my enemies is represented by a separate unique NPC.
by sheamkennedy
Sun May 03, 2015 3:28 pm
Forum: Q&A Discussion
Topic: Help, I'm having a weird problem in my game
Replies: 9
Views: 2021

It would likely be from multiple scripts running. I've made sure that everywhere in my code that frees a slice has line that sets that variable to zero in the following line.

So if it is multiple scripts running then is there a good way to solve this?
by sheamkennedy
Sat May 02, 2015 6:53 pm
Forum: Q&A Discussion
Topic: Help, I'm having a weird problem in my game
Replies: 9
Views: 2021

I figured it out, kind of... Thanks to the slice tree I narrowed the script down to about 1000 lines of code in which the error may be occurring. The slice being produced was actually a Laser from an NPC who I had already destroyed. I had conditions to make sure that NPCs shooting script could not c...
by sheamkennedy
Sat May 02, 2015 8:18 am
Forum: Q&A Discussion
Topic: Help, I'm having a weird problem in my game
Replies: 9
Views: 2021

Help, I'm having a weird problem in my game

I just noticed this weird problem in my game. In the game I have guards which walk around and shoot you if you are in their line of sight. The lasers they shoot are coded to originate from the NPC, this seems to always work. But occasionally when I face certain directions with my hero while they are...
by sheamkennedy
Thu Apr 30, 2015 2:55 pm
Forum: Q&A Discussion
Topic: How to make bullet originate from enemy (walktall)?
Replies: 6
Views: 1515

Well, for myself, the main advantage of keeping enemies and projectiles as siblings in my own scripts is that I can easily loop through them and run scripts that update them each tick. That might not be something you want to do for your game, so you might prefer to stick with the parenting methods ...
by sheamkennedy
Thu Apr 30, 2015 1:57 pm
Forum: Q&A Discussion
Topic: How to make bullet originate from enemy (walktall)?
Replies: 6
Views: 1515

I'm assuming the advantage of using siblings is that since every bullet shares a common parent then altering that parent can alter all the bullets at once?

Thanks for the response. I'll hopefully get around to trying this soon since I've been making good progress on enemy creation.