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.


Messages - MJRNightmare

Pages: [1]
1
Help, Errors, FAQ / Re: Message.cs
« on: 2009-12-11, 08:50:59 AM »
My bad, thought I needed the message.cs after reading the older posts, so I imported from the code folder.

Just tried again without it. Still got an error about too many messages. So I added ClearAllMessages before displaying the new message. All good now.

Requirements:
- Cool or Fire font tileset (I think you need the first character "!" in Slot 33 of the frameset to follow the ASCI position or something, correct me if I'm wrong)
- A Rule with
Clear All Messages
SetMessageFont
SetMessagePosition
ShowMessage

Thx

2
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-11, 07:42:31 AM »
oops didn't see the "update submission" button.

thx Blue

3
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-10, 01:35:12 PM »
OK made the changes and posted the new version Bluemonkmn. Just overwrite the previous version. While I was at it formatted the project more like SHFL example.

Cheers

4
Help, Errors, FAQ / Message.cs
« on: 2009-12-10, 11:35:06 AM »
Hi all,

Is there trick to make the Message.cs work? I imported the message.cs to a project, won't compile. I created a new message.cs and pasted the contents of the original .cs file, won't compile. I think I read every post on message boxes, still lost. Saw the messagebox with character, but not ready to add more variables to my existing problem of not being able to display messages. There is no Showmessage or any other message functions added yet, just the message.cs in the Source code section. Do I need to declare the added code somewhere? Do message boxes need their on layer?

Thx

Quote
warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
d:\Documents and Settings\bernapau\Desktop\SGDK212\Library\Projects\Tutorial_1\SpriteBase.cs(2092,11) : warning CS0219: The variable 'result' is assigned but its value is never used
d:\Documents and Settings\bernapau\Desktop\SGDK212\Library\Projects\Tutorial_1\GameForm.cs(118,7) : warning CS0618: 'System.Windows.Forms.Form.AutoScale' is obsolete: 'This property has been deprecated. Use the AutoScaleMode property instead.  http://go.microsoft.com/fwlink/?linkid=14202'
d:\Documents and Settings\bernapau\Desktop\SGDK212\Library\Projects\Tutorial_1\GameForm.cs(177,11) : warning CS0168: The variable 'coopCode' is declared but never used
d:\Documents and Settings\bernapau\Desktop\SGDK212\Library\Projects\Tutorial_1\Message.cs(82,13) : error CS1501: No overload for method 'DrawText' takes '6' arguments

5
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-07, 08:27:54 AM »
Thanks Vincent,

I solved the cannon ball overlap by adding an invisible keyframe and repeating it for 12 frames before advancing to the actual cannon ball frame. Short term fix. I like the sound of you isDynamic function.

Cheers

6
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-04, 03:53:37 PM »
Hi Vincent,

I love all this head banging prevention from the forum. It's so easy to get bent on finding a solution, only to find out one doesn't exist or you are looking in the wrong direction for the solution. I was thinking maybe make a couple blank frames in the cannon ball animation(so far I haven't got the timing right) or doing an offset or last thought, redraw a dynamic turret on top of the old turret after firing. I'll take a look at you game, nothing like learning from example.

Thanks

7
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-04, 02:24:54 PM »
Thanks for the feedback guys! I'll make the changes to the cannon and ship. There is a simple timer, it goes off when you cross into the plan, then resets once you are out. I did that just to see the plan was going on and off as entered or left the rectangle. If you are in the plan, they all fire simultaneously at 60. I was more focused on getting the tracking working than looks or playability. Actually I want to make a series of different turrets, plasma, laser, guided etc... Once I get there I'll start adding the subtleties.

The ship going through solids stumped me as well. Good to know now I can squash that issue.

I just made my own cannon graphics with Sketchup, looks great and moves perfectly, but the cannonball is drawing on top of the cannon. Is there a way to set the priority programmatically on dynamic sprites? I tried SelectLastCreatedSprite from the cannon just after the cannon ball is created, then setTargetParam "Priority" lower than the cannon, but still showing up on top. Is there a way to control the priority on the dynamic sprites?

Cheers

8
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-12-02, 03:56:39 PM »
Back from Turret town!

I was stumped for 2 days, almost gave on the turret tracking dream. Then I decide to add movebyvelocity to see what the turret would do once in motion. It worked perfectly except for the fact it was following me. So I added a rule to reset pixelX and pixelY. Voila turrets that watch your every move. As GetPolarStateByVector describes, you have to setup the first state in the sprite as right, each subsequent state counter clockwise. The order in the sprite state window matters! 8 states or 72. Right 1st, DonwRight at the bottom of the list.

Then it was time to Fire! Well the cannon balls only went right??? So I set the cannon balls up like the turret with some minor differences. You don't need to reset pixel X and Y since we want them to move. They also needed 8 states, even though they were all the same frame, to fire in the 8 different directions. Didn't make sense to me at the time, but if you used the missiles from the 3D space ship demo, you'd would want the missiles pointing in the same direction as the turret barrel. Then I used PolarAccelerate after the initial PushtowardsCategory, to stop the cannon ball from following the player and continue on straight path.

Once that was all done, I decide to add a second turret and realized, my hard coded X and Y would be a problem, so I changed the rule to get the original pixelX and Y before any other rule and copy it to a parameter, then pass it back just after GetPolarStateByVector rule. Now they are self contained. You can add as many turrets(sprites) as you want, just include them in the Manage Cannon Plan firing sequence.

Then I was on a mission... again... I added the explosions on contact, destroy breakables, collision test with player and health counter. Almost feels like a game! AWESOME and Onwards!!!

Bluemonkmn, can a post the turret test project somewhere? It's about 700KB.

Cheers

9
Help, Errors, FAQ / Re: Player Tracked by Turret
« on: 2009-11-29, 08:36:47 AM »
Thanks for the help/replies bluemonkmn and TheLaw,

I'm going to try it out right after this post. I had tried with GetPolarStatByVector, since it sounded just like an automated version of using atan2, but I had the output going to wrong place, a counter (to use later) I think, not"state". Makes sense to me now.

On a side note making the projectiles aim via pushtowardscat is awesome. Then I added a rule once moving to continue in the same direction so it's not a heat seeking missile anymore. My heat seeking missiles are glad the cannon balls aren't infringing on their turf now.

OK, so c# nice but not a must. Off to turret making town...

Cheers guys!

10
Help, Errors, FAQ / Player Tracked by Turret
« on: 2009-11-27, 04:04:39 PM »
Hi all,

great forum, SGDK rocks!

Ah the challenges of being a noob! I'm trying to get my turret to track me, like it is watching me until I'm close enough for it to fire. ie: if player1 is left and higher than the turret point UpLeft etc...  automatically changing states based on the player location. I tried with rules like if Player X< Turret X, changeState left. Am I banging my head against the wall trying to do it with rules? I get it to work for left, UpLeft, right and UpRight, but adding Y just locks the state to the Up, since player is usually higher than the turrets Y and there is no rule for inbetween angles. I used PushTowardCategory, that made my cannon balls heat seaking missles. Woohoo!

I see atan seems to be the way to figure out the right angle/radian. Is there a built in function or do I have to write one? If I have to write a rule/function, should I do export as something like CustomTurret.cs with my current rule, then replace it function using atan. My math isn't great so go easy on me!

Also is c# Express the way to go as far as editing .cs files? I see you can open projects in Express, can you compile them as well? Any special setup required?

Newest Noob - MJRNightmare! Thx


Pages: [1]