*
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   News: Check out Megaglest  with 4 new factions and more.
 
  Home Search Login Register  
Pages: 1 2 3 4 5 [6]
  Print  
Author Topic: Glest tower defense  (Read 16961 times)
me5
Guard
***
Posts: 66


View Profile
« Reply #125 on: November 15, 2009, 01:06:27 PM »

I already tried this workaround but wanted to make it work with "patrolfuncions" (this is my emergency solution  Wink).
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #126 on: November 19, 2009, 10:28:44 PM »

Ok... thats a lot of code to do not much  Cry

I think it was interesting to try to do something so ambitious with the limitations of glest 3.2s scripting interface, but its time to put that experiment aside, and move this project on to a GAE mod.

I will unfortunately have to ask you to be a little bit patient, the lua additions have been added in a 'branch' that was separated from the 'trunk' some time ago, so it would be pointless building an experimental executable atm, because it would be very buggy.  We have been very busy hunting and killing bugs though, and 0.2.12b should be ready soon (hopefully on the weekend), after that is all wrapped up, I'll merge the lua extensions and bug-fixes and get you an experimental GAE to continue with.

I went through your script, grabbed the 'idea' of what you were doing, then rewrote it using timers and triggers...
This is much nicer to look at, I'm sure you'll agree Wink
NB: probably best to start reading under the 'startup' comment header, the createAttackers() function probably wont make sense until you've seen the registerRegion() and registerEvent() calls further down.
Code:
<?xml version="1.0" standalone="yes" ?>
<scenario>

<difficulty value="0"/>
<players>
<player control="human" faction="defence" team="1"/>
<player control="cpu" faction="attack" team="2"/>
<player control="closed"/>
<player control="closed"/>
</players>
<map value="glestTD_1"/>
<tileset value="forest"/>
<tech-tree value="td_1"/>
<default-resources value="false"/>
<default-units value="false"/>
<default-victory-conditions value="false"/>
 
<scripts>
 
<startup>
----------------------------------------------------------------------------
--                Unit Creation and Group Management                      --
----------------------------------------------------------------------------

-- create an attack group
function createAttackers()
  for i=1,attackers.number do
    createUnit(attackers.type, 1, attackers.startPoint);
    local id = lastCreatedUnit();
    --debugLog("created a "..attackers.type.." id = "..id);
    attackers.units[#attackers.units+1] = id;
    givePositionCommand(id, "move", attackers.waypoints[1]);
    setUnitTrigger(id, "waypoint_reached");
    setUnitTrigger(id, "in_finish_area");
  end
end

-- takes an array of type and position pairs, creates units for faction
function createStartingUnits(typeAndPosition, faction)
  for i=1,#typeAndPosition do
    createUnit(typeAndPosition[i][1], faction, typeAndPosition[i][2])
  end
end       

-- remove a unit id from a group, returns true if removed, false if unit wasn't in the group
function removeFromGroup(group, unitId)
  for i= 1,#group do
  if group[i] == unitId then
    table.remove(group, i);
    return true;
  end
  end
  return false;
end

----------------------------------------------------------------------------
--                             Utilities                                  --
----------------------------------------------------------------------------

-- returns a rectangle around the point 'pos'
function areaAround(pos)
  return { pos[1]-5, pos[2]-5, pos[1]+5, pos[2]+5 };
end

-- takes an array of type and amount pairs, gives resources to faction
function giveResources(typeAndAmount, faction)
  for i=1, #typeAndAmount do
    giveResource(typeAndAmount[i][1], faction, typeAndAmount[i][2]);
  end
end


----------------------------------------------------------------------------
--                             Start-Up                                   --
----------------------------------------------------------------------------

attackers = {};
attackers.startPoint = {49,81};
attackers.waypoints = {{49,30}, {5,30}};
attackers.units = {}
attackers.type = "daemon";
attackers.number = 6;

registerRegion("waypoint", areaAround(attackers.waypoints[1]));
registerEvent("waypoint_reached", "region=waypoint");

finish = areaAround({15,30});
registerRegion("finish", finish);
registerEvent("in_finish_area", "region=finish");

disableAi (1);

player_units = {
  { "worker",   {30,40} },
  { "worker",   {15,20} },
  { "worker",   {20,20} },
--  { "ground1",  {40,60} },
--  { "ground1",   {60,60} },
  { "castle2",  { 5,30} }
}
player_resources = {
  { "gold",  2000 },
  { "stone",  300 },
  { "wood",  2000 },
  { "food",   500 }
}
createStartingUnits(player_units, 0);
giveResources(player_resources, 0);
setCameraPosition(startLocation(0));
showMessage('Welcome', 'welcome')

reward_resources = {
  { "gold",  2000 },
  { "stone",  300 },
  { "wood",  2000 },
  { "food",   500 }
}

lives=100;
wave=0;
no_bonus = {}

setTimer("start_wave", "game", 40 * 5, false);
</startup>
 
<unitEvent name="waypoint_reached">
  -- when a attacker reaches way-point 1...
  givePositionCommand(unit_id, "move", attackers.waypoints[2]);
</unitEvent>

<unitEvent name="in_finish_area">
  -- triggers when a bad guy enters finish area...
  lives = lives - 1;
  no_bonus[#no_bonus+1] = unit_id;
  setDisplayText("Amount of lives: "..lives);
if lives == 0 then --we lost
clearDisplayText()
setPlayerAsWinner(1)
endGame()
end
</unitEvent>

<timer name="start_wave">
  if wave == 19 and lives > 0 then -- victory?
  setPlayerAsWinner(0);
  endGame();
  end
  if wave == 5 then -- after 5 waves of daemons, switch to guards
    attackers.type = "guard";
    attackers.number = 6;
  elseif wave == 10 then -- after 5 waves of gaurds, switch to horsemen
    attackers.type = "horseman";
    attackers.number = 3;
  end
  -- create a wave and start them on their way
  createAttackers();
  wave = wave + 1;
</timer>
 
<unitDied>
local deadId = lastDeadUnit();
--debugLog("unit death "..lastDeadUnitName().." id = "..deadId);

if unitFaction(deadId) == 0 then -- human unit, do nothing
  return;
end

if not removeFromGroup(no_bonus, deadId) then -- if not in finish area
  --debugLog("giving reward");
  giveResources(reward_resources, 0);         -- give player reward
--else
  --debugLog("no reward");
end

if removeFromGroup(attackers.units, deadId) then   -- remove from attackers
  if #attackers.units == 0 then                    -- if attackers now empty, set timer for next wave
    setTimer("start_wave", "game", 40 * 5, false); -- 5 seconds (at normal game speed)
    if wave == 19 then
      setDisplayText("This was the last wave");
    end
  end
end
</unitDied>

</scripts>
</scenario>

If you have any queries, fire away Smile
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #127 on: November 23, 2009, 09:24:13 AM »

It looks really neat! Smile

some questions on porting to GAE:

can I use units from 3.2.2 in GAE or are there things I have to add like new tabs in the xml file or such?

is this how this awesome eventtriggeringthing works? :
" registerEvent("name_of_my_event", "look_for_this_condition"); "
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #128 on: November 24, 2009, 12:43:04 AM »

It looks really neat! Smile

some questions on porting to GAE:

can I use units from 3.2.2 in GAE or are there things I have to add like new tabs in the xml file or such?

If it works for 3.2.2 it will work on GAE... there are new features you may want to make use of...
see,
XML Specs.
XML Ref.

and I started documented the new Lua functions, but this is incomplete (no triggers yet) and some of it may be wrong Wink
Lua Ref.

Quote
is this how this awesome eventtriggeringthing works? :
" registerEvent("name_of_my_event", "look_for_this_condition"); "

In essence, yes.  I've actually been pulling together a scenario to make sure everything is sensible... the system has had to be changed a bit.  You register a 'unitEvent' by providing a name, you then have handler in your XML that looks like <unitEvent name="myEvent">--some lua</unitEvent>, or if you are in an external Lua file, you define a function called unitEvent_myEvent, which takes one parameter, the unit id of the unit triggering the event, so it would look like function unitEvent_myEvent(unit_id) --[[ code ]] end

If you use the XML event handler, the unit id is always called unit_id, if you define the function in a lua file, you can call it whatever you like.

You then set up triggers on units, with 'condition' strings that I did have in registerEvent, now done in setUnitTrigger()
So the process now is like this...
Code:
registerEvent("waypoint_reached");  -- register the event
function unitEvent_waypoint_reached(unit_id) -- define the event
-- set another waypoint, attack, run-away... ?
givePositionCommand(unit_id, "attack", startLocation(0));
end

waypoint = { 50,50 } -- our waypoint
registerRegion("waypoint", area_around(waypoint)); -- register the 'region' around the waypoint
-- and set a trigger, supplying the unit id, a condition string, and the event to fire when the condition is met
setUnitTrigger(some_unit_id, "region=waypoint", "waypoint_reached");

givePositionCommand(some_unit_id, "move", waypoint)

The only accepted conditions for triggers that I have so far are, region=registeredRegion and command_callback
but a couple of others, attacked and hp-below=threshold will probably be in soon.
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #129 on: November 28, 2009, 10:52:09 PM »

An experimental build of GAE, with all the new Lua, is out, please refer to this topic,
http://glest.org/glest_board/index.php?topic=4841.0

and I've been busy documenting it all, see
https://sourceforge.net/apps/trac/glestae/wiki/LuaReference

The code I posted of the re-write using the new stuff will need to have the registerEvent() and setUnitTrigger() function calls changed to suit the new system, the 'conditions' will need to be moved from registerEvent() to setUnitTrigger(). Let me know if you have any problems.
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #130 on: November 29, 2009, 08:57:00 AM »

Thx for letting me know!
btw: "unitCount(factionIndex)" is explained twice  Wink
(https://sourceforge.net/apps/trac/glestae/wiki/LuaReference)
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #131 on: November 30, 2009, 01:10:31 AM »

btw: "unitCount(factionIndex)" is explained twice  Wink

Thanks! It was a bit of a cut-n-paste frenzy by the end Smile
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #132 on: December 03, 2009, 03:27:26 AM »

!!!!NEW CODE SAME BUG!!!!!  Angry Angry Angry

Guess what? I fixed it.  Grin
The guards died of hunger. The CPU player has no food so the guards die. I just changed the the xml file of the guard and there you go.

Things I found out about GAE (0.2.X-win32) so far:

1. The xml comments does not work ("<!-- -->")
2. I have the win mouse over the glestmouse.
3. If you zoom out there are no shadows at the edge of the screen (it depands on the position of the sun/light).
4. When I type in the "console" the short cuts are active.
5. What about changing the names of all hilight-functions to highlight-funcions?
6. What about using "==" instead of "=" for conditions like: 'region==name' instead of 'region=name'. I wondering about this because in
    C++ and LUA one use "==" for conditions (correct me if I'm wrong).
7. Sometimes (two times till now) GAE is going crazy by that I mean the speed is set to normal but the speed is superfast (faster than
   fast). But not only the speed ingame is so fast also the speed in the menu is superfast (the animations in the menu are superfast and
  the blinking buttons blinks superfast when mouseover).

8. NEW CODE NEW BUG Grin Grin  It seems like sometimes units hinder eachother and then one will stop to move. (just try my new code
    or make alot of units and give them a long way to move-> some units will get stuck)

new code:
Code:
<?xml version="1.0" standalone="yes" ?>
<scenario>

<difficulty value="0"/>
<players>
<player control="human" faction="defence" team="1"/>
<player control="cpu" faction="attack" team="2"/>
<player control="closed"/>
<player control="closed"/>
</players>
<map value="TD_like_4"/>
<tileset value="forest"/>
<tech-tree value="td_1"/>
<default-resources value="false"/>
<default-units value="false"/>
<default-victory-conditions value="false"/>
 
<scripts>
 
<startup>
----------------------------------------------------------------------------
--                Unit Creation and Group Management                      --
----------------------------------------------------------------------------

-- create an attack group
function createAttackers()
  for i=1,attackers.number do
createUnit(attackers.type, 1, attackers.startPoint);
local id = lastCreatedUnit();
--debugLog("created a "..attackers.type.." id = "..id);
attackers.units[#attackers.units+1] = id;
givePositionCommand(id, "move", attackers.waypoints[1]);
--debugLog("gave movecommand to ".. i .." id = "..id);
setUnitTrigger(id, "region=waypoint", "waypoint_reached");
setUnitTrigger(id, "region=finish", "in_finish_area");
  end
end

-- takes an array of type and position pairs, creates units for faction
function createStartingUnits(typeAndPosition, faction)
  for i=1,#typeAndPosition do
createUnit(typeAndPosition[i][1], faction, typeAndPosition[i][2])
  end
end       

-- remove a unit id from a group, returns true if removed, false if unit wasn't in the group
function removeFromGroup(group, unitId)
  for i= 1,#group do
  if group[i] == unitId then
table.remove(group, i);
return true;
  end
  end
  return false;
end

----------------------------------------------------------------------------
--                             Utilities                                  --
----------------------------------------------------------------------------

-- returns a rectangle around the point 'pos'
function areaAround(pos)
  return { pos[1]-3, pos[2]-3, (2*3), (2*3) };
end

-- takes an array of type and amount pairs, gives resources to faction
function giveResources(typeAndAmount, faction)
  for i=1, #typeAndAmount do
giveResource(typeAndAmount[i][1], faction, typeAndAmount[i][2]);
  end
end


----------------------------------------------------------------------------
--                             Start-Up                                   --
----------------------------------------------------------------------------

attackers = {};
attackers.startPoint = {49,81};
attackers.waypoints = {{49,30}, {5,30}};
attackers.units = {}
attackers.type = "guard";
attackers.number = 6;

registerRegion("wa", {20,20,10,10});
registerRegion("waypoint", areaAround(attackers.waypoints[1]));
registerEvent("waypoint_reached");

finish = areaAround({15,30});
registerRegion("finish", finish);
registerEvent("in_finish_area");

disableAi (1);

player_units = {
  { "worker",   {30,40} },
  { "worker",   {15,20} },
  { "worker",   {20,20} },
--  { "ground1",  {40,60} },
--  { "ground1",   {60,60} },
  { "castle2",  { 5,30} }
}
player_resources = {
  { "gold",  2000 },
  { "stone",  300 },
  { "wood",  2000 },
  { "food",   500 }
}
createStartingUnits(player_units, 0);
giveResources(player_resources, 0);
setCameraPosition(startLocation(0));
showMessage('Welcome', 'welcome')

reward_resources = {
  { "gold",  2000 },
  { "stone",  300 },
  { "wood",  2000 },
  { "food",   500 }
}

lives=100;
wave=0;
no_bonus = {}

setTimer("start_wave", "game", 40 * 5, false);
</startup>
 
<unitEvent name="waypoint_reached">
  -- when a attacker reaches way-point 1...
  givePositionCommand(unit_id, "move", attackers.waypoints[2]);
</unitEvent>

<unitEvent name="in_finish_area">
  -- triggers when a bad guy enters finish area...
  lives = lives - 1;
  no_bonus[#no_bonus+1] = unit_id;
  setDisplayText("Amount of lives: "..lives);
if lives == 0 then --we lost
clearDisplayText()
setPlayerAsWinner(1)
endGame()
end
</unitEvent>

<timer name="start_wave">
  if wave == 19 and lives > 0 then -- victory?
  setPlayerAsWinner(0);
  endGame();
  end
  if wave == 5 then -- after 5 waves of daemons, switch to guards
attackers.type = "guard";
attackers.number = 6;
  elseif wave == 10 then -- after 5 waves of gaurds, switch to horsemen
attackers.type = "horseman";
attackers.number = 3;
  end
  -- create a wave and start them on their way
  createAttackers();
  wave = wave + 1;
</timer>
 
<unitDied>
local deadId = lastDeadUnit();
--debugLog("unit death "..lastDeadUnitName().." id = "..deadId);

if unitFaction(deadId) == 0 then -- human unit, do nothing
  return;
end

if not removeFromGroup(no_bonus, deadId) then -- if not in finish area
  --debugLog("giving reward");
  giveResources(reward_resources, 0);         -- give player reward
--else
  --debugLog("no reward");
end

if removeFromGroup(attackers.units, deadId) then   -- remove from attackers
  if #attackers.units == 0 then                    -- if attackers now empty, set timer for next wave
setTimer("start_wave", "game", 40 * 5, false); -- 5 seconds (at normal game speed)
if wave == 19 then
  setDisplayText("This was the last wave");
end
  end
end
</unitDied>

</scripts>
</scenario>
Logged
hailstone
GAE Team
Battle Machine
********
Posts: 1249


View Profile WWW
« Reply #133 on: December 03, 2009, 07:06:12 AM »

I've added 2. and 4. to trac. I haven't tested the others.
Logged

Glest Advanced Engine - Project Coordinator
http://sourceforge.net/apps/trac/glestae/
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #134 on: December 03, 2009, 06:37:01 PM »

1. The xml comments does not work ("<!-- -->")
That's interesting... I'd have thought this might be from the move to TinyXML, but I know I've used them since with-out problem, will investigate.

Quote
3. If you zoom out there are no shadows at the edge of the screen (it depands on the position of the sun/light).
I think it's more to do with the orientation and distance of the camera, shadows only appear to be rendered correctly (as in, at all) in the area the Glest 'game mode' camera would be looking at, been meaning to open a ticket for this...

Quote
5. What about changing the names of all hilight-functions to highlight-funcions?
Make the names even longer? No. How about I make them colourCells() and colourRegion(), and add an optional parameter to specify colour to show them with? That'd make them more useful.

Quote
6. What about using "==" instead of "=" for conditions like: 'region==name' instead of 'region=name'. I wondering about this because in C++ and LUA one use "==" for conditions (correct me if I'm wrong).
In C++ and Lua, you use for == for comparison. Trigger conditions are not comparisons, they specify a trigger type and optionally some extra data for that trigger (with the extra data redundant and omitted for simple conditions). Perhaps it should be 'in_region=name' or some such, but I don't think I'll change that one.

Quote
7. Sometimes (two times till now) GAE is going crazy by that I mean the speed is set to normal but the speed is superfast (faster than fast). But not only the speed ingame is so fast also the speed in the menu is superfast (the animations in the menu are superfast and the blinking buttons blinks superfast when mouseover).

8. NEW CODE NEW BUG Grin Grin  It seems like sometimes units hinder eachother and then one will stop to move. (just try my new code or make alot of units and give them a long way to move-> some units will get stuck)

7 is an odd one, never experienced it myself, could you possibly provide some details on the hardware you're running?

8 is a problem that is being looked at, but yes, especially with a narrow path and a number of units, some may be blocked and 'give up' and cancel their command. You could set 'command_callback' triggers, but to use them effectively you will probably need to start keeping some information about each unit's state in lua.  I've actually being playing with 'finite state machines' a bit of recent, making a scenario and doing a feasibility study at the same time. I doubt you want full blown state machines, but I'll try to rig up a simple framework you can use to manage your bad guys better.

Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #135 on: December 04, 2009, 11:47:46 AM »

Quote
Make the names even longer? No. How about I make them colourCells() and colourRegion(), and add an optional parameter to specify colour to show them with? That'd make them more useful.

Sounds nice.

Quote
In C++ and Lua, you use for == for comparison. Trigger conditions are not comparisons, they specify a trigger type and optionally some extra data for that trigger (with the extra data redundant and omitted for simple conditions). Perhaps it should be 'in_region=name' or some such, but I don't think I'll change that one.

I was thinking like: if region == myregion than activate trigger. But I think stick with "=" is ok.

(I use an AMD CPU (4400+) and ATI graphic board (all in wonder X800GT))
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #136 on: December 06, 2009, 12:15:13 PM »

for glest I use most:
OS: winXP (SP2)
and CatalystControlCenter says:
-DriverPackagingVersion: 8.593.100.1-...
-CatalystVersion: 09.3
-OpenGLVersion 6.14.10.8543

Can I do this by using GAE:
-A tower which slows down unist.
-A tower which has a turret which turns in the direction of the enemy and then fires.
-A unit with particles. For example a burning unit (not only when damaged).

(@silnarm how about markRegion, it's even shorter  Smile )
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #137 on: December 07, 2009, 12:46:39 PM »

I guess
Quote
-A tower which slows down unist.
works (one can add effects to the attack http://glest.wikia.com/wiki/GAE/Guide)
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #138 on: December 08, 2009, 07:56:00 PM »

Can I do this by using GAE:
-A tower which has a turret which turns in the direction of the enemy and then fires.
No, as per Glest the whole model would have to rotate, this would make a good feature request though..

-A unit with particles. For example a burning unit (not only when damaged).
Not yet.

Quote
(@silnarm how about markRegion, it's even shorter  Smile )
Actually, I think colourRegion, or maybe shadeRegion, might be best, as I'll be adding an outlineRegion soon Wink

I guess
Quote
-A tower which slows down unist.
works (one can add effects to the attack http://glest.wikia.com/wiki/GAE/Guide)
Yeah, please let us know how you go with the effects, I never really tested them while I was changing things recently, hopefully I didn't break anything!
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #139 on: December 09, 2009, 05:47:59 AM »

OK I tried to make
Quote
-A tower which slows down unist.

I only changed the attack tag in the xml file of my tower but it seems like it does not work.
At first I tried to set a "static-modifiers" to slow down the units. After that I added the "multipliers" tag but it seems like it changed
nothing. Are there other things I have to change or is it only the xml of the unit?

Here is the attack tag of my unit:

Code:
<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="30"/>
<anim-speed value="30"/>
<animation path="models/frosttower.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/defense_tower_attack1.wav"/>
<sound-file path="sounds/defense_tower_attack2.wav"/>
</sound>
<attack-strenght value="2"/>
<attack-var value="50"/>
<attack-range value="17"/>
<attack-type value="piercing"/>
<attack-start-time value="0"/>
<attack-fields>
<field value="land"/>
<field value="air"/>
</attack-fields>
<projectile value="true">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="true">
<sound-file path="sounds/arrow_hit1.wav"/>
<sound-file path="sounds/arrow_hit2.wav"/>
<sound-file path="sounds/arrow_hit3.wav"/>
<sound-file path="sounds/arrow_hit4.wav"/>
<sound-file path="sounds/arrow_hit5.wav"/>
</sound>
</projectile>
<splash value="true">
<radius value="3"/>
<damage-all value="true"/>
<particle value="true" path="particle_splash.xml"/>
</splash>
<effects>
<effect name="icy_chill"
bias="detrimental"
stacking="stack"
target="any"
chance="100.0"
duration="8">
<static-modifiers>
<attack-speed value="-25"/>
<movement-speed value="-70"/>
</static-modifiers>
<multipliers>
<sight value="0.0"/>
<movement-speed value="0.2"/>
</multipliers>
<light enabled="true" red="0.8" green="0.1" blue="0.1"/>
<flags>
<apply-splash-strength/>
</flags>
</effect>
</effects>
</skill>
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #140 on: January 14, 2010, 03:08:27 AM »

Made it Grin

so if you want to use a slowdown effect this code worked for me:

Code:
<effect name="icy_chill"
bias="detrimental"
stacking="stack"
target="all"
chance="100.0"
duration="8">

<static-modifiers>
<move-speed value="-30"/>
</static-modifiers>

<multipliers>
<sight value="0.0"/>
</multipliers>

<flags/>
<fields-added/>
<fields-removed/>
<light enabled="false"/>
<sound enabled="false"/>
<particle value="false"/>
<recourse-effects/>
</effect>

In the wiki there is a "<apply-splash-strength/>" flag but I can't make it work for me!  Undecided
But it seems to work without this flag

if you don't know where to put the effect here is the whole attacktag

Code:
<skill>
<type value="attack"/>
<name value="attack_skill"/>
<ep-cost value="0"/>
<speed value="30"/>
<anim-speed value="30"/>
<animation path="models/frosttower.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/defense_tower_attack1.wav"/>
<sound-file path="sounds/defense_tower_attack2.wav"/>


</sound>
<attack-strenght value="2"/>
<attack-var value="50"/>
<attack-range value="17"/>
<attack-type value="piercing"/>
<attack-start-time value="0"/>
<attack-fields>
<field value="land"/>
<field value="air"/>
</attack-fields>
<projectile value="true">
<particle value="true" path="particle_proj.xml"/>
<sound enabled="true">
<sound-file path="sounds/arrow_hit1.wav"/>
<sound-file path="sounds/arrow_hit2.wav"/>
<sound-file path="sounds/arrow_hit3.wav"/>
<sound-file path="sounds/arrow_hit4.wav"/>
<sound-file path="sounds/arrow_hit5.wav"/>
</sound>
</projectile>
<splash value="true">
<radius value="3"/>
<damage-all value="true"/>
<particle value="true" path="particle_splash.xml"/>
</splash>
<effects>
<effect name="icy_chill"
bias="detrimental"
stacking="stack"
target="all"
chance="100.0"
duration="8">

<static-modifiers>
<move-speed value="-30"/>
</static-modifiers>
<multipliers>

<sight value="0.0"/>
</multipliers>

<flags/>
<fields-added/>
<fields-removed/>
<light enabled="false"/>
<sound enabled="false"/>
<particle value="false"/>
<recourse-effects/>
</effect>
</effects>
</skill>
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #141 on: February 11, 2010, 09:15:08 PM »

Wow, I have been a bit slack checking the forum of recent.. but not much was happening, and I didn't think I'd missed anything.... where would I be without Hailstone's community development monthly.

In the wiki there is a "<apply-splash-strength/>" flag but I can't make it work for me!  Undecided
But it seems to work without this flag

Ok, thanks... I've been meaning to go through and figure out what effects work and which don't, but have been kept very busy with other things, did this refuse to load? or load but have no effect in game?
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #142 on: February 13, 2010, 01:11:26 PM »

It loads but seems to kind of turning off the slowdown effect. I also tried to change the radius to 10 but it still doesn't work. The bad guys are hit/damaged by the effect and I can see the splasheffect but they move at the same speed as before they were hit.
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #143 on: February 14, 2010, 04:13:58 AM »

Thanks for the info, I'll create a ticket to make sure it gets looked into at some stage, but it probably wont be looked at until after 0.2.13 is out, sorry.
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #144 on: February 17, 2010, 09:58:52 AM »

Quote
.., but it probably wont be looked at until after 0.2.13 is out, sorry.
Never mind! The most important thing I would like to see to be fixed is the "units get stucked" issue but it seems like this one is alreydy fixed, is it? (No longer a problem with HAA*)
Logged
silnarm
GAE Team
Golem
********
Posts: 819



View Profile
« Reply #145 on: February 18, 2010, 02:58:51 AM »

Quote
.., but it probably wont be looked at until after 0.2.13 is out, sorry.
Never mind! The most important thing I would like to see to be fixed is the "units get stucked" issue but it seems like this one is alreydy fixed, is it? (No longer a problem with HAA*)

It damn well better be!   Undecided

Yes, I think I finally got the whole pathfinder thing sorted out.  I may have to make some small fixes yet, but I wont be spending much more time on the "time-thief".
Logged
me5
Guard
***
Posts: 66


View Profile
« Reply #146 on: July 30, 2010, 03:56:35 AM »

Look at the first post.  Wink
Logged
wciow
GAE Team
Archmage
********
Posts: 665



View Profile
« Reply #147 on: July 30, 2010, 05:40:30 AM »

Nice update  Thumb Up

Logged
ultifd
Airship
********
Posts: 2625


The Glest Video Man :) The one and only. :P


View Profile WWW Email
« Reply #148 on: July 30, 2010, 01:56:52 PM »

Cool, nice update. Now I can re-try...  Thumb Up
Logged

me5
Guard
***
Posts: 66


View Profile
« Reply #149 on: August 04, 2010, 04:43:26 AM »

Have someone reached the last wave (without cheating Tongue ) ?
Logged
Pages: 1 2 3 4 5 [6]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Glest theme by Omega. Based on Diablos3 theme by Vaun using media by Josepzin.
Valid XHTML 1.0! Valid CSS!