As Always, a Few Questions (New Post Pg. 2)

正在查看此主题的用户

You can use any slot from 0 to 255.

slot_castle_exterior is a constant with the value 10.

When you use slot_castle_exterior, you're using slot 10. Which is the same slot as slot_town_center.

 
I tried using ~245 slots, and I found that after slot 198, the game doesn't keep the slot values.  Are we sure it's 256?

I have a new question, though.  I'm trying to create naptha.  It currently gives off fire and smoke, but I want it to do area-effect damage.  I remember someone saying it's possible, through checking which agents are a certain distance in front of the person throwing the naptha, and then making them all take damage.  I'm sure I need to use positions and such, but I've never been good with agents.
So, how do I check to see if some soldiers (ally and enemy) are within, say, a semi-circle of radius 1 meter in front of the person throwing the weapon?  And then, how do I make them take only some damage, as opposed to dropping their health to a specific amount?

Thank you to anyone who answers.


I'm sure some people have messed around with the new scene prop animation things, but in case people didn't know, you can send an object (a cannonball, in my case) across the battlefield based on it being struck, if you use the 'position_move_x' operation.
Also, you can spawn horses, troops, and items from props, and then you can use the horses and items (looks like armagan will be including battlefield equipment pickup in the next version).  The troops, as far as I know, can only be allied, and can't be enemies.
 
I won't give you a complete answer to the above, but here are some hints:

1) You can trigger an event on the action of a weapon (ranged only) being fired, but you can't tell which troop fired it or where on the battlefield they are.  So you need to make sure that the item has, hardcoded, all the information it needs to isolate the bearer when it activates its trigger.  The only way I know of to do that is to make sure that only one agent (or troop) onfield owns that specific item.  You may need duplicate items because of this.

2) Semi-circle of radius 1 is easy once you have the position of the bearer.  (get_distance_between_positions) and (position_is_behind_position) give you a semicircle.  If you want to go for fancier shapes or locations, you'll need to learn to use the (transform_position_to_local) and the local modes [last argument zero] of the (position_move_x) family of operations.

3) You can read their health and you can set it.  Therefore you can have them take any specific amount of damage you desire.

Hope those help.
 
Perfect!  I didn't really want an exact answer, I just wanted to be pointed in the general direction of what to do.  I was wary about posting the question.  I'll give that a go, though.  Thanks much for the answer.:smile:

I have another question:  Does anyone know where to find the meshes used for flora?  I can't find them anywhere, and I want to make cannonballs using boulders.
 
后退
顶部 底部