pftq.com
Welcome! Please Login or Register!
November 21, 2024, 02:55:50 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Need help creating a ?Flare Unit? Effect 0 Members and 2 Guests are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] 2 3 ... 6 Print
Author Topic: Need help creating a ?Flare Unit? Effect  (Read 33597 times)
MosheLevi
Member
*****
Offline Offline

Posts: 28

« on: May 21, 2008, 12:39:20 PM »

Hi pftq,

I have tried to create the "Flare Unit" Effect with your help the other day but the effect didn?t work.

I may need more assistance with that.

Here is what I have so far:

<Effect name="Flare Unit">
         <Param name="PlayerID" dispName="Player" varType="player">1</Param>
         <Param name="Duration" dispName="Duration" varType="float">1.0</Param>
         <Param name="Srcunit" dispName="Center Unit" VarType="unit">default</Param>
         <Param name="Flash" dispName="Flash" varType="bool">true</Param>
         <Command>trMinimapFlare(%PlayerID%, %Duration%, vector(xsVectorGetX(kbUnitGetPosition(%Srcunit%)), xsVectorGetY(kbUnitGetPosition(%Srcunit%)), xsVectorGetZ(kbUnitGetPosition(%Srcunit%))), %Flash%);
          </Command>
</Effect>

Please let me know what you think I should try next.
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #1 on: May 21, 2008, 03:43:19 PM »

Did it crash all triggers or just this one effect?
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #2 on: May 22, 2008, 11:02:25 AM »

No crash, all other triggers still work fine.
Just this trigger doesn't work (maybe because it is the last effect on the file).

Random22 sent me this effect last night, and I will check it later on today.
What do you think?

<Effect name="Flare Minimap on Unit">
   <Param name="PlayerID" dispName="$$22301$$Player" varType="long">0</Param>
   <Param name="Duration" dispName="$$20510$$Duration" varType="float">1.0</Param>
   <Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
   <Param name="Flash" dispName="$$22492$$Flash" varType="bool">true</Param>
   <Command loop="" loopParm="SrcObject">trMinimapFlare(%PlayerID%, %Duration%, kbGetBlockPosition("%SrcObject%"), %Flash%);</Command>
   </Effect>
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #3 on: May 22, 2008, 04:33:09 PM »

You want to use kbUnitGetPosition;  the Block position uses a different ID than the triggers require.  The confusion is what originally caused the Advanced Triggers Set to force designers not to delete units (deleting units cause the block ID to differ from the Unit ID).

kbUnitGetPosition(1*%SrcObject%)

It might work as well.  The thing is that it has to be a vector object you are using.


What I meant by other triggers not working is whether having this effect "froze" all triggers on your map.  Whether it's the last effect on file has nothing to do with the problem.
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #4 on: May 28, 2008, 03:37:26 PM »

The first effect I used didn't cause any problem.

The effect that Random22 sent me works great.

Do you think there is still a problem with it?
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #5 on: May 28, 2008, 03:40:19 PM »

What is the effect now - you haven't shown me.
Logged
MosheLevi
Member
*****
Offline Offline

Posts: 28

« Reply #6 on: May 30, 2008, 03:45:38 PM »

Still the same:

<Effect name="Flare Minimap on Unit">
   <Param name="PlayerID" dispName="$$22301$$Player" varType="long">0</Param>
   <Param name="Duration" dispName="$$20510$$Duration" varType="float">1.0</Param>
   <Param name="SrcObject" dispName="$$19160$$Unit" varType="unit">default</Param>
   <Param name="Flash" dispName="$$22492$$Flash" varType="bool">true</Param>
   <Command loop="" loopParm="SrcObject">trMinimapFlare(%PlayerID%, %Duration%, kbGetBlockPosition("%SrcObject%"), %Flash%);</Command>
   </Effect>

By the way, are you going to participate in the AOE3 Custom Scenarios Contest?
Check it out at Scenario Design Forum at Heaven Games.

« Last Edit: May 30, 2008, 03:48:06 PM by MosheLevi » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #7 on: June 01, 2008, 01:39:05 PM »

Yes - I replied to that above... please check.  I strongly recommend against the use of BlockPosition.
Logged
Random22
Member
*****
Offline Offline



Posts: 33

WWW
« Reply #8 on: June 13, 2008, 09:10:20 PM »

pftq,
      I have just signed up for your forums, But maybe you can help me a bit. I am working on this for Moshe, It doesn't work but maybe you can see somehing wrong.

     <Effect name="Flare Minimap on Unit Type">
    <Param name="PlayerID" dispName="Player" varType="long">0</Param>
    <Param name="Duration" dispName="Duration" varType="float">1.0</Param>
    <Param name="Units" dispName="Unit Type" varType="unit">default</Param>
    <Param name="Flash" dispName="Flash" varType="bool">true</Param>
    <Command loop="" loopParm="SrcObject">trMinimapFlare(%PlayerID%, %Duration%, kbUnitGetPosition(1*%Units%), %Flash%);</Command>
   </Effect>
Logged

-Random22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thats Right More Random22 Signature Wink
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #9 on: June 14, 2008, 12:43:12 PM »

Hi, I appologize if my advice is not entirely foolproof - just a warning here as my memory is a bit foggy. Smiley

But just so we're on the same track, below is my logic.  I remember there were two distinct types of area:

Vector - Generally use the vector(float x, float y, float z).
ex. the original flare effect:
trMinimapFlare(%PlayerID%, %Duration%, vector(%Position%), %Flash%)
 - where %Position% is by default (0,0,0)

Quantity - Not sure how to name these, but pretty much (x,y,z) without combining them into a vector.
ex. Move from Area
trUnitMoveFromArea(%DstPoint%, -1, %AttackMove%, %PlayerID%, "%UnitType%", %Radius%)
 - where %DstPoint% is default (0,0,0)*
** (0,0,0) alone is not a vector; functions such as xsVectorGetX(vector xyz) will not accept it unless it is put into the vector() function first.



Seeing as the flare effect requires the location as a vector, as is kbUnitGetPosition/BlockPosition, it should work.
However, I would also try vector(kbGet...).

One thing though - why do you have:

loop="" loopParm="SrcObject"

*nvm - forgot about the center unit Tongue But you would need to change the variable name accordingly.


Also, what actually happens with the code? Does that one effect not work or does it cause all conditions/effects in the same trigger to freeze up as well?
« Last Edit: June 14, 2008, 12:53:24 PM by pftq » Logged
Random22
Member
*****
Offline Offline



Posts: 33

WWW
« Reply #10 on: June 14, 2008, 12:50:26 PM »

Alright, I asked the guys on aom.heavengame.com's forums and this is what they gave me.

     <Effect name="Flare Minimap on Unit Type">
    <Param name="PlayerID" dispName="Player" varType="player">1</Param>
    <Param name="Duration" dispName="Duration" varType="float">1.0</Param>
    <Param name="Units" dispName="Unit Type" varType="unittype">default</Param>
    <Param name="Flash" dispName="Flash" varType="bool">true</Param>
    <Command loop="" loopParm="Units">trMinimapFlare(%PlayerID%, %Duration%, kbGetBlockPosition("%Units%"), %Flash%);</Command>
   </Effect>

I think this will help.
Logged

-Random22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thats Right More Random22 Signature Wink
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #11 on: June 14, 2008, 12:54:28 PM »

Hm - I'm pretty sure it should be:

varType="unit"

instead of unittype but you can give it a shot.

You also want to keep the ""+1*%Units% - it clears the id to an integer value as a float id such as 1.0 often messes up the function.

Again, what actually happens with the trigger?
« Last Edit: June 14, 2008, 01:05:35 PM by pftq » Logged
Random22
Member
*****
Offline Offline



Posts: 33

WWW
« Reply #12 on: June 14, 2008, 04:16:11 PM »

I really don't see what you're saying, Can't you type it out for me please?
Logged

-Random22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thats Right More Random22 Signature Wink
pftq
Administrator
*****
Offline Offline



Posts: 4204

WWW
« Reply #13 on: June 14, 2008, 07:02:36 PM »

<Effect name="Flare Minimap on Unit Type">
    <Param name="PlayerID" dispName="Player" varType="player">1</Param>
    <Param name="Duration" dispName="Duration" varType="float">1.0</Param>
    <Param name="Units" dispName="Unit Type" varType="unit">default</Param>
    <Param name="Flash" dispName="Flash" varType="bool">true</Param>
    <Command loop="" loopParm="Units">trMinimapFlare(%PlayerID%, %Duration%, kbGetBlockPosition(""+1*%Units%), %Flash%);</Command>
   </Effect>

Logged
Random22
Member
*****
Offline Offline



Posts: 33

WWW
« Reply #14 on: June 15, 2008, 06:30:20 PM »

Why varType="units"? Does it like get the units ID and Flare on its ID?
Logged

-Random22^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thats Right More Random22 Signature Wink
Pages: [1] 2 3 ... 6 Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Need help creating a ?Flare Unit? Effect « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.069 seconds with 21 queries.