onFragment help

Freeform discussion about anything related to modding Transcendence.
Post Reply
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

I have tried to put an onFragment event into the misslie but the onFragment doesn't seem to be seen.
http://paste.neurohack.com/view/YkY83/
The top code doesn't load and the bottom is just the fragment section revised which does load but doesn't work.
Any ideas
"Have you guys ever watched the show?" ~ Guy
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

OnFragment is an event, you are instead using it as a fragment.

You should do:
<events>
<onfragment>
blah blah
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

Ok, so I used it as an event and got the following:

OnFragment [thermo damage]: No binding for symbol: aFireAngle ### (sysCreateWeaponFire "0xE5AC5001" gSource aFirePos aFireAngle (typGetDataField (itmGetUNID gItem) "speed") aTargetObj) ###

Code changed a little too but it seems to not like the onfragment event.

http://paste.neurohack.com/view/YNwW4/
"Have you guys ever watched the show?" ~ Guy
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

Removed aFireAngle and am pulling the angle manually using (objGetDir gSource) per a comment made by Atarlost in 2008.
No more error message but it still doesn't create weapon fire...

http://paste.neurohack.com/view/YyX2j/
"Have you guys ever watched the show?" ~ Guy
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

It's because you put the <events> inside the <weapon>.
<events> is a child of <itemtype> and so it's not part of the w<weapon> child.

You can check some examples of weapons with events in Atarlost's mods.
Vachtra
Militia Commander
Militia Commander
Posts: 308
Joined: Tue Feb 16, 2010 2:03 am
Location: Texas
Contact:

Good to know but still no second phase. It did help with another project though.
All of the events seem to be onfireweapon.

Just another question. Is there a problem with the weapon being a launcher?
After it's working I plan on doing a list with different onFragment events for each missile.
"Have you guys ever watched the show?" ~ Guy
Post Reply