Adding WeaponPosition

Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Adding WeaponPosition
PostPosted: Tue Jul 17, 2007 3:50 am 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked






Joined: Sat Jun 12, 2004 12:53 am
Posts: 2884
Location: _____________________________ Current Scorched3d Rank: 1 _____________________________ *clink*
Many, many moons ago I made a WeaponPosition primitive - never did commit it. It since got lost, but I just remade it, and have committed it.

Added a note to the wiki on it:

==== WeaponPosition ====

Sets the position of an accessory explicitly on (or over or under) the landscape.

<accessoryaction type="WeaponPosition">
<position><a>float</a><b>float></b><c>float</c></position><font color=yellow><i>
The coordinates of the position desired for the next accessory</i></font>
<positionoffset><a>float</a><b>float</b><c>float</c></positionoffset> <B>(optional)</B><font color=yellow><i>
A random offset value. The position will be offset by up to +/- each of these coordinates</i></font>
<onground>bool</onground> <B>(optional - default=false)</B><font color=yellow><i>
When set to true the height will be forced to ground level, ignoring any "c" value in position. The offset value can still be used (carefully!)</i></font>
<aimedweapon>Weapon</aimedweapon><font color=yellow><i>
Can be any of the [[#Weapons|weapon accessories]]</i></font>
</accessoryaction>

Side note: Gavin, what's this stuff, anyway:
Whatever.h wrote:
#if !defined(AFX_WeaponPosition_H__B5C043F0_7DC6_4198_AE5B_E19002234FCE__INCLUDED_)
#define AFX_WeaponPosition_H__B5C043F0_7DC6_4198_AE5B_E19002234FCE__INCLUDED_


I just copied another file and started from there, it had that stuff in it... looks like some MS cruft to me, but I have no idea. ;) Something tells me I should remove it....
To be honest, I don't fully understand that page, but it sounds like it provides the answers you need. - Deathstryker

She doesn't stimulate me mentally or physically... I need at least one of those - Anonymous

Who wrote this crap? - G. Camp


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 17, 2007 1:55 pm 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
Quote sounds good, the more actions the better :)

Quote:
#if !defined(AFX_WeaponPosition_H__B5C043F0_7DC6_4198_AE5B_E19002234FCE__INCLUDED_)
#define AFX_WeaponPosition_H__B5C043F0_7DC6_4198_AE5B_E19002234FCE__INCLUDED_


Don't remove them, these unique guards are required around every header file. They prevent the header file from being included more than once (and thus defining the same class twice). The big load of numbers and letters are just VisualC trying to make sure the identifiers are unique.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 17, 2007 10:19 pm 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked






Joined: Sat Jun 12, 2004 12:53 am
Posts: 2884
Location: _____________________________ Current Scorched3d Rank: 1 _____________________________ *clink*
Note that VC did not add those directly - rather they are from another .h file that I modified to start this one, so the identifier value is actually the same as another (I think I used WeaponVelocity.h)
To be honest, I don't fully understand that page, but it sounds like it provides the answers you need. - Deathstryker

She doesn't stimulate me mentally or physically... I need at least one of those - Anonymous

Who wrote this crap? - G. Camp


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 12:48 am 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
cbx550f wrote:
Note that VC did not add those directly - rather they are from another .h file that I modified to start this one, so the identifier value is actually the same as another (I think I used WeaponVelocity.h)


Thats fine, just so long as its not the same as the other file. I sometimes copy some and just change the class name.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 1:07 am 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked






Joined: Sat Jun 12, 2004 12:53 am
Posts: 2884
Location: _____________________________ Current Scorched3d Rank: 1 _____________________________ *clink*
Perfect - all I did there, same as I have done before, is do a :%s/WeaponVelocity/WeaponPosition/g in vi. ;)
To be honest, I don't fully understand that page, but it sounds like it provides the answers you need. - Deathstryker

She doesn't stimulate me mentally or physically... I need at least one of those - Anonymous

Who wrote this crap? - G. Camp


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 9:27 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Sat Apr 24, 2004 6:52 am
Posts: 1393
Location: Florida, USA
Awesome, I remember us talking about this. Glad to see that make its way into the code. Seemed like we had about 5 different roundabout ways to get an effect to happen somewhere specifically on the map. Its nice to finally have one clear-cut, simple method of placing an event exactly where you want it to. That will make doing things like I did with disabling the shields on 2forts much easier and straight-forward.

Thanks Paul.
Undead.

Scorched 3D Documentation & Help


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 11:26 pm 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked






Joined: Sat Jun 12, 2004 12:53 am
Posts: 2884
Location: _____________________________ Current Scorched3d Rank: 1 _____________________________ *clink*
No probs, Rob. Glad to finally get it done.


Good to see ya here, stop in again sometime! ;)
To be honest, I don't fully understand that page, but it sounds like it provides the answers you need. - Deathstryker

She doesn't stimulate me mentally or physically... I need at least one of those - Anonymous

Who wrote this crap? - G. Camp


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group