You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Even Stranger Techtreex Problems
posted 26 July 2007 11:51 PM EDT (US)   
And I thought my protox problems were bad! What I have here is completely insane-no idea why it wont work. Acually, i mean the above literally. I don't want the tech to activate, but it always does! The prereq says it will only research if the unit test is alive, but at the start of the game the tech is researched infinite amounts of times. Why? If anyone can help, please do. Below is the tech:

(tech name="FavorTech" type="Normal")
(dbid)840(dbid)
(displaynameid)x(displaynameid)
(researchpoints)0.0000(researchpoints)
(status)Persistent(status)
(icon)tech t favor(icon)
(rollovertextid)x(rollovertextid)
(buttonpos column="0" row="0")(buttonpos)
(delay)0.0000(delay)
(flag)Volatile(flag)
(prereqs)
(typecount count="1.00" operator="gte" state="noneState aliveState " unit="test")(typecount)
(prereqs)
(effects)
(effect type="Sound")favorget.wav(effect)
(effect type="TextOutput")11503(effect)
(effect amount="8.00" relativity="Absolute" resource="Favor" subtype="Resource" type="Data")
(target type="Player")(target)
(effect)
(effect amount="-1200.00" relativity="Absolute" subtype="Hitpoints" type="Data")
(target type="ProtoUnit")test(target)
(effect)
(effects)
(tech)

Check out all of the mods I made here

[This message has been edited by MythicRuler (edited 07-26-2007 @ 11:52 PM).]

Replies:
posted 27 July 2007 00:12 AM EDT (US)     1 / 7  
Change Status to Obtainable
posted 27 July 2007 00:28 AM EDT (US)     2 / 7  
Then what I want to do wont work. It is supposed to be able to be researched more that once, and it is supposed to happen automatically. (like pharaoh respawn)

Check out all of the mods I made here
posted 27 July 2007 01:13 AM EDT (US)     3 / 7  
That's what the volatile flag is for. You want it to be obtainable ie. available when the prereqs are valid, but volatile so they are rechecked. P.S. you should update the delay as I think it determines how long between checks.
posted 27 July 2007 12:10 PM EDT (US)     4 / 7  
Ok. So delay is how many seconds it will wait to check the prereqs? Ok i get that but there still is a problem. The tech is researched automatically at the start of game, even with the status at obtainable. Whys is this?

Check out all of the mods I made here

[This message has been edited by MythicRuler (edited 07-27-2007 @ 06:44 PM).]

posted 27 July 2007 07:00 PM EDT (US)     5 / 7  
I set delay to 1.0000 and made the tech obtainable but the prereqs were still ignored. Here is exactly what happened:

1.I playtested a map.
2.The second the game started, a message came up and said improvement researched or something of the sort.
3.Then i was given 3 favor, but the test unit did not lose 1200 Hp. When I trained the test unit, it did not reactivate the tech, and it stayed alive, giving me 0 favor. What is going on?

Check out all of the mods I made here

[This message has been edited by MythicRuler (edited 07-27-2007 @ 07:05 PM).]

posted 28 July 2007 08:20 PM EDT (US)     6 / 7  
I think what's happening is that the units max hitpoints are being set to zero, not the actual hitpoints. The unit wouldn't be able to regain HPs, but still needs to lose them.

Given you only want the unit there for a short time use a decay (or whatever the reverse of heal is). E.g. if the unit had 3 HP, autogathered favor at a rate of 1 per second and decayed at a rate of 1HP per second. When created it should generate 3 favor and die.
posted 31 July 2007 09:30 PM EDT (US)     7 / 7  
That is what I had at first, but the lifespan did not work. That was my protox problem topic.

Check out all of the mods I made here
Age of Mythology Heaven » Forums » Modding and Scripting » Even Stranger Techtreex Problems
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames