Page 1 of 2

Posted: Fri Feb 18, 2005 9:09 am
by Sam The Butcher
Is it possible? If it is how do you do it? I want to have a unit pick up objects on the map. Not objects that are already there, but objects that have been dropped. Exp archers to pick up flame arrows that have been dropped by other archers. I have used geometry test to attack objects, by using geometry test then linking it to an attack command. When I try to link the geometry test with pick up command it asks me in the pick up object pain to select the object to pick up. Thing is the object isnt on the map at the start. I tried not selecting anything in the pick up-object-elements pain, and instead just added a link to the location that the geometry test puts the results of the test and a link to the unit to pick the item up. It didnt work though. I am going to keep trying, but I thought I would also ask here in case I cant figure it out. Thanks



Edited By Sam The Butcher on 1108735894

Posted: Fri Feb 18, 2005 12:23 pm
by Unkfolt
Do you want the archer to pick up the flame arrows already dropped on the ground, like from another dead archer, or do you want him to drop the arrows? Regular Myth 2 archers can already pick up flame arrows dropped by other archers without scripting.

Posted: Fri Feb 18, 2005 1:29 pm
by A-Red
Are you saying you want uncontrollable or enemy archers to pick up the fire arrow? That's a pretty good idea.

Try creating a blank container for the projectiles (call it "--Fire Arrows--" or something) and put that blank container into the Results Action Identifier in the GEOM action. Then set "test items inside field name" to "proj"

I'm not the greatest expert on GEOMs, but I think that would do the trick. Also make sure you have an area to test in, either a polygon or a radius or entire map.

A-Red

Posted: Fri Feb 18, 2005 1:46 pm
by Phex
You could make the archers walk to the place where the projectile lays on the ground and then give the projectile to the archer with a UNIT CONTROL map action and the 'Give Monster Artifact or Projectile' parameter.
Dont forget when you use this map action, the projectile is directly given to the monster, which means without a pickup order, without pickup sequence and no matter where it is.
Maybe you could replace the taunt sequence of your archers with the pickup sequence and make them taunt while they are given the projectile.

rgds,
- Phex.

Posted: Fri Feb 18, 2005 2:56 pm
by Sam The Butcher
Thanks for helping. Yes I am trying to get an enemy Arc to pick up a flame arrow if one is dropped.
Phex I tried what you told me. Maybe I am not fully understanding what you are saying. When I try to link the geometry test to a movement or pickup command it doesnt work. The Geometry test is for a flame arrow in range of the arc.
The movement command needs a waypoint. Since I don't know the waypoint, the arrow could be dropped anywhere. I cant give it a waypoint.
The Pick up command needs me to select an object on the map to pick up. Since the arrow doesnt start on the map I can select one.
If I try to link either the movement command or the pickup command to where the flame arrow geometry test is placed nothing happens. Example: I dont place a waypoint in the movement command. Instead I place a link to.
<<< Flame arrow >>> results place from geometry test.
Is that what u were talking about doing?
I can get a unit to attack a projectile by linking a geometry test to an attack command, but not a movement or pick up command.

Posted: Fri Feb 18, 2005 7:44 pm
by A-Red
Sam The Butcher wrote:Example: I dont place a waypoint in the movement command. Instead I place a link to.
<<< Flame arrow >>> results place from geometry test.
Is that what u were talking about doing?
I can get a unit to attack a projectile by linking a geometry test to an attack command, but not a movement or pick up command.

I don't quite understand what you said you are doing, but I don't think that's right. What I'm suggesting would look like this.

--Flame Arrows--[don't put anything in here]

GEOM Any Flame Arrows?
Circle Centerpoint(monster): [insert archer here]
Circle Radius: 20
Results Action Identifier: --Flame Arrows--
Test Actions Inside Field Name: proj
Activates on Success: Archer Get Arrows

PICK Archers Get Arrows

I don't know how to make the PICK action work though. It has a mandatory Objects field rather than a link. Try leaving Objects blank and make a Link to --Flame Arrows--. I'm not sure if it will work. The GEOM above should filter the arrows correctly, but it needs to activate another action that gives the archers --Flame Arrows--, and I am not sure how to make that second action work.

Posted: Fri Feb 18, 2005 9:35 pm
by Sam The Butcher
Yea Red thats basically what I did what you have. It didn't work. The problem comes in on the second part. The Pick up item. Thats what I tried bypassing the mandatory object select then putting a link to the geometry test location. It doesn't seem to work that way. I am going to try some different settings expires on trigger,success ect.. Maybe it isn't possible. I am going to keep trying. If I get it to work I'll post the solution here. In case you or anyone else is interested in doing the same thing. Thanks



Edited By Sam The Butcher on 1108780817

Posted: Sat Feb 19, 2005 3:21 pm
by Walrus Momentum
I tested A-Red's suggestion, and it does work except that the field name needs to be 'obje' (the "Object" parameter of the PICK action takes an obje).

Posted: Sat Feb 19, 2005 3:34 pm
by A-Red
Hey, you got it to work! Now I know. Thanks!

A-Red

Posted: Sat Feb 19, 2005 5:24 pm
by Sam The Butcher
Thanks Walrus. I am not totally sure what you mean though. Are you saying in the "Pick" Parameters to make a custom parameter? Name: obje Type:projectile. Then element flame arrow?
Or are you saying that I have to select something that is an object? For the "Object" field. That I cant do cause the object isn't on the map yet to select it.
If I leave the "object" field empty and try to use a link instead. It doesn't do anything with the link. It seems like the Pick Up command Needs to have an Object-parameter element selected.

Posted: Sat Feb 19, 2005 6:16 pm
by A-Red
I think what he meant was change the "proj" in the GEOM's test actions inside field name to "obje"

A-Red

Posted: Sat Mar 12, 2005 2:07 pm
by Sam The Butcher
Ok I have tried all the suggestions. It may be that I am doing something wrong but I cannot get it to work. The problem seems to be with the "pick up" command part. The "geom test" works. I can get the Arcs to attack the spot where the flame arrow fell. The "pick up" command mandatorally wants me to pick the object for the unit to pick up. With the arrows not on the map at the start I can't select it. The arrows only appear if an Arc drops one when dieing. So I cant select it with the "pick up" command in the mandatory "object to pick up" field in the "pick up" command.
I have another idea to mb get it to work. By using the "teleport" command. So my idea is to when an arc drops its flame arrow. Have it dissapear and be replaced by another arrow that is on the map from the beginning. That I can select for the "object to pick up" field. I tried it once but it didnt work. This though maybe from my lack of scripting knowledge. I cant seem to be able to teleport anything but "monsters". My questions are. Are monsters the only thing that can be teleported? Also for the teleport command do you have to actually select the destination, or can you use the "geom test results location" for the destination? If monsters are the only thing that can be teleported, but the destination can be "geom test results location" then I will make a "flame arrow monster" if possible.
I am asking anyone, but Myrd I would really like to hear from you, since it seems that you know everything about Myth. Also like I said in another thread. I will PayPal
10$ to the 1st person to show me how to accomplish the task of. Scripting Arc to pick up Flame Arrows dropped by other Arcs. Just to show my appreciation for your time and effort. I really want to make this work. Thanks




Edited By Sam The Butcher on 1110654496

Posted: Sun Mar 13, 2005 12:22 am
by A-Red
Got it!

The working script is:

bowmen (mons_identifier subj)

GEOM Any Fire Arrows?
Object Type: arfa
Circle Centerpoint (monster): [insert archers here]
Circle Radius: 20
Results Action Identifier: Pick Up Arrows
Tested Items Inside Field Name: obje
Activates on Success: Pick Up Arrows

PICK Pick Up Arrows
Link: bowmen

The difference is that now the Results Action Identifier is the pick up action, so you are feeding the arrows directly into the PICK instead of putting them in a container and linking the container to the PICK.

A-Red

P.S. MOMAs only work for monsters

Posted: Tue Mar 15, 2005 10:41 am
by Sam The Butcher
Kick ass Red you rock!!! I got it to work. Thanks so much for helping me. You know scripting really good. I had no idea that the Geom and other commands could be combined that way. Awesome. I am learning scripting kinda on a need to know bases. I have an idea then I try to figure out how to make it work. I printed out all of the Fear/Loathing Docs, I can get most of my answers there, but not all. It is great to have ppl like you and the other helpful ppl on the Magma forums to turn to when all else fails. Thanks again. Knowing how to do this opens alot of doors and possabilities to what I can do with the map I'm working on. What is your PayPal account? I'll get the $ sent to you ASAP. May take couple days we (my fiance and I) have a debit card on a seperate account we use for internet purchases. We dont keep much in it just in case. So I may have to make a deposite. I really appreciate your help.

Posted: Tue Mar 15, 2005 12:29 pm
by A-Red
I don't have a paypal account, but don't worry about it. Advice is free. I would never have been able to learn scripting if it weren't for people willing to teach me free of charge. I'm just happy to help.

A-Red