Re: Need Suggestions on Making a Necromancer
Posted: Wed Jun 08, 2011 8:23 pm
Thanks everyone for all your help, this has been a frustrating but ultimately enjoyable and rewarding project.
I've been hard at work on this testing it over and over again, but still I am failing. I have gotten much closer, but I'm still failing. Attached is the loathing script for what I have so far. I know it is messy, and I plan to clean it up and add much more to it, but right now this is just a test for me to make sure I can find a body and bring it back to life. In this case, I am just trying to find a warrior body and replace it with a new warrior.
To that end, I have created a necromancer who shoots a projectile onto the ground. The map action then finds the projetile and stores its location. Then a geom searches around it to make sure that there is a body there, and if there is, it stores the body location (for later scripting use, not yet implemented). When it finds a body I search for the necromancer projectile a second time, and this time store its location as a dest. A MOMA moves an invisible unit I created called the S Necro Thrall Creator to the location of the projectile. A Geom then searches for the body AGAIN and stores its location this time as a wayp. Then, the S Necrom Thrall Creator attacks the ground at the body's location with a short range projectile attack, and when his projectile comes to rest, that little SOB promotes into a warrior. TADA!!!
Just kidding, its sloppy and broken somewhere, but hey I'm trying here.
That little unit control I do to make him visible is just to test that everything up to that point is working, and it is. He becomes visible, but NEVER ATTACKS. If I set the attack ground location manually ALL WORKS WELL. The error is, apparently, in the storage of the WHERE TO RAISE variable. It may store, it may not, but whatever the case, he never attacks the location. This is the #1 issue. Anyone who can solve it would have my thanks a thousand times over.
Issue #2, less important: this script is sloppy as old people having sex. For one, I have to store the projectile location with two different geom's, and I have to store the wamd (warrior dead body) location with two separate Geoms. Pyro, I tried just using one storage action for each and making multiple geom's store different locations at once but when I did that anything that linked to those actions was broken. Ex., I would try to make a single storage container: Raise dead projectile location, and use 1 Geom to store it as a dest there and 1 Geom to store it as a cent there. But then the "warrior bodies around?" action just refused to work. Any ideas as to why that is happening would be great too.
Thanks in advance for any insights anyone can provide.
~fildred13
The code:
=====NECROMANCER CRAP=====
{
}
Make Creators Invisible [Unit Control]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Invisible Flag
true
Uncontrollable
true
}
Where is the projectile? [Geometry Filter]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Warrior Bodies Around?
Results Action Identifier
Raise Dead Projectile Location
Maximum Number of Items
1
Choose Random Items
Tested Items Inside Location Field Name
cent
}
Raise Dead Projectile Location
{
}
Warrior Bodies Around? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Body Location
Activates on Success
Where should spawner move?
Tested Items Inside Location Field Name
dest
Maximum Number of Items
1
}
Warrior Body Location
{
}
Where should spawner move? [Geometry Filter]
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Move Thrall Creator1
Results Action Identifier
Where to spawn!
Maximum Number of Items
1
Tested Items Inside Location Field Name
dest
}
Where to spawn!
{
}
Move Thrall Creator1 [Move Marker]
only_initial_delay
deactivates_on_trigger
2.00, 2.00
{
Destination
Link
Where to spawn!
Subject
10094 (S Necro Thrall Creator)
Activates on Success
Make Thrall Creator Visible
Where to Raise?
}
Make Thrall Creator Visible [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Visible Flag
true
}
Where to Raise? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Raise Location
Tested Items Inside Location Field Name
wayp
Maximum Number of Items
1
Activates on Success
Thrall Creator Creates!
}
Warrior Raise Location
{
}
Thrall Creator Creates! [Attack]
deactivates_on_successful_execution
0.00, 0.00
{
Attackers
10094 (S Necro Thrall Creator)
Attack Ground Location
Link
Warrior Raise Location
}
I've been hard at work on this testing it over and over again, but still I am failing. I have gotten much closer, but I'm still failing. Attached is the loathing script for what I have so far. I know it is messy, and I plan to clean it up and add much more to it, but right now this is just a test for me to make sure I can find a body and bring it back to life. In this case, I am just trying to find a warrior body and replace it with a new warrior.
To that end, I have created a necromancer who shoots a projectile onto the ground. The map action then finds the projetile and stores its location. Then a geom searches around it to make sure that there is a body there, and if there is, it stores the body location (for later scripting use, not yet implemented). When it finds a body I search for the necromancer projectile a second time, and this time store its location as a dest. A MOMA moves an invisible unit I created called the S Necro Thrall Creator to the location of the projectile. A Geom then searches for the body AGAIN and stores its location this time as a wayp. Then, the S Necrom Thrall Creator attacks the ground at the body's location with a short range projectile attack, and when his projectile comes to rest, that little SOB promotes into a warrior. TADA!!!
Just kidding, its sloppy and broken somewhere, but hey I'm trying here.
That little unit control I do to make him visible is just to test that everything up to that point is working, and it is. He becomes visible, but NEVER ATTACKS. If I set the attack ground location manually ALL WORKS WELL. The error is, apparently, in the storage of the WHERE TO RAISE variable. It may store, it may not, but whatever the case, he never attacks the location. This is the #1 issue. Anyone who can solve it would have my thanks a thousand times over.
Issue #2, less important: this script is sloppy as old people having sex. For one, I have to store the projectile location with two different geom's, and I have to store the wamd (warrior dead body) location with two separate Geoms. Pyro, I tried just using one storage action for each and making multiple geom's store different locations at once but when I did that anything that linked to those actions was broken. Ex., I would try to make a single storage container: Raise dead projectile location, and use 1 Geom to store it as a dest there and 1 Geom to store it as a cent there. But then the "warrior bodies around?" action just refused to work. Any ideas as to why that is happening would be great too.
Thanks in advance for any insights anyone can provide.
~fildred13
The code:
=====NECROMANCER CRAP=====
{
}
Make Creators Invisible [Unit Control]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Invisible Flag
true
Uncontrollable
true
}
Where is the projectile? [Geometry Filter]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Warrior Bodies Around?
Results Action Identifier
Raise Dead Projectile Location
Maximum Number of Items
1
Choose Random Items
Tested Items Inside Location Field Name
cent
}
Raise Dead Projectile Location
{
}
Warrior Bodies Around? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Body Location
Activates on Success
Where should spawner move?
Tested Items Inside Location Field Name
dest
Maximum Number of Items
1
}
Warrior Body Location
{
}
Where should spawner move? [Geometry Filter]
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Move Thrall Creator1
Results Action Identifier
Where to spawn!
Maximum Number of Items
1
Tested Items Inside Location Field Name
dest
}
Where to spawn!
{
}
Move Thrall Creator1 [Move Marker]
only_initial_delay
deactivates_on_trigger
2.00, 2.00
{
Destination
Link
Where to spawn!
Subject
10094 (S Necro Thrall Creator)
Activates on Success
Make Thrall Creator Visible
Where to Raise?
}
Make Thrall Creator Visible [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Visible Flag
true
}
Where to Raise? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Raise Location
Tested Items Inside Location Field Name
wayp
Maximum Number of Items
1
Activates on Success
Thrall Creator Creates!
}
Warrior Raise Location
{
}
Thrall Creator Creates! [Attack]
deactivates_on_successful_execution
0.00, 0.00
{
Attackers
10094 (S Necro Thrall Creator)
Attack Ground Location
Link
Warrior Raise Location
}