[Request/Idea]Auto-cloak fusions
Moderator: Moderators
-
- Posts: 26
- Joined: 06 Mar 2009, 14:19
[Request/Idea]Auto-cloak fusions
Is it possible to programm a widget that makes cloakable fusions (widely used in xta) cloak automatically when an enemy (air) scout approaches them?
Re: [Request/Idea]Auto-cloak fusions
To answer your question: Yes, quite easily.
Could be done in under 20 lines if you just did "If an enemy radar plane is seen, cloak all fusions". But could get complex if you want them to only cloak if plane is close to the fusions, or only if flying towards fusions. It would also be a bit tricky to implement uncloaking when coast is clear.
Could be done in under 20 lines if you just did "If an enemy radar plane is seen, cloak all fusions". But could get complex if you want them to only cloak if plane is close to the fusions, or only if flying towards fusions. It would also be a bit tricky to implement uncloaking when coast is clear.
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: [Request/Idea]Auto-cloak fusions
This would probably be a good base for such a widget
http://spring.jobjol.nl/show_file.php?id=1579
http://spring.jobjol.nl/show_file.php?id=1579
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: [Request/Idea]Auto-cloak fusions
hmm good idea. i like the way you think.
i added this to my tribulex widget (the one that everyone hates that spams "ARM BOI RUNNING" points all over the map. lol)
i added this to my tribulex widget (the one that everyone hates that spams "ARM BOI RUNNING" points all over the map. lol)
Re: [Request/Idea]Auto-cloak fusions
I loledTribulex wrote:hmm good idea. i like the way you think.
i added this to my tribulex widget (the one that everyone hates that spams "ARM BOI RUNNING" points all over the map. lol)
-
- Posts: 42
- Joined: 28 Dec 2008, 00:42
Re: [Request/Idea]Auto-cloak fusions
I'm guessing the best way to do this is to make a timer that detects enemy units right? Or is there a way I can make an event function called when an enemy enters an area?
Re: [Request/Idea]Auto-cloak fusions
Use UnitEnteredLos(unitID, unitTeam) callin or UnitEnteredRadar(unitID, unitTeam).
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: [Request/Idea]Auto-cloak fusions
Why don't you just make a more simple but yet effective approach first? Simply do a widget that cloaks all fusions / whatever buildings else you want to cloak when you press a key. Doesn't auto-cloak but before you start ramming your head against a wall while thinking of a good way to determine when to cloak / uncloak (which might eat up some quite some precious CPU power) the approach of manually cloaking / decloaking everything in an easy and fast way is half the rent imo...
You usually see radar planes heading your direction anyway and know when they are dead so it's not too much to handle...
You usually see radar planes heading your direction anyway and know when they are dead so it's not too much to handle...
-
- Posts: 42
- Joined: 28 Dec 2008, 00:42
Re: [Request/Idea]Auto-cloak fusions
I'll make the both. One for keybinded cloaking, one experimental for auto-cloaking.
Re: [Request/Idea]Auto-cloak fusions
It'd be nice to have a cloaking option on factories so units are automatically cloaked when they exit their lab.
Re: [Request/Idea]Auto-cloak fusions
While it's not optional, the initcloaked FBI tag will make a unit cloak automatically upon build completion. If you'd prefer that default you could always request the mod maker to add it to the applicable units.JAZCASH wrote:It'd be nice to have a cloaking option on factories so units are automatically cloaked when they exit their lab.
-
- Posts: 26
- Joined: 06 Mar 2009, 14:19
Re: [Request/Idea]Auto-cloak fusions
krogoths idea was quite simple but would really solve the problem.
unfortunatly im a java programmer and lua is c/c++ (at least wikipedia says so )
ofc java is still better
would be really nive if anyone could da that in some spare minutes of his life ,
grapefruit
edit: what about cloaking the cloakable antis of xta too, when pressing the key?
unfortunatly im a java programmer and lua is c/c++ (at least wikipedia says so )
ofc java is still better
would be really nive if anyone could da that in some spare minutes of his life ,
grapefruit
edit: what about cloaking the cloakable antis of xta too, when pressing the key?
-
- Posts: 42
- Joined: 28 Dec 2008, 00:42
Re: [Request/Idea]Auto-cloak fusions
I disagree with Java being more 1337! But that's for another discussion thread.
I recently had to stop learning the language due to spring break. Basically I became lazy. Anyways, I'm back in my groove and learning again.
Also, Lua isn't in C++ or even similar to C or C++ for that matter. Lua is syntactically similar to Javascript with BEGIN and END for function brackets.
As for the app, I'm still too ignant to know what I'm doing to make it properly. As a result, I wouldn't mind if someone warped ahead of me and finished it if anyone cared. It'll be another month before I start working on it (:P).
I recently had to stop learning the language due to spring break. Basically I became lazy. Anyways, I'm back in my groove and learning again.
Also, Lua isn't in C++ or even similar to C or C++ for that matter. Lua is syntactically similar to Javascript with BEGIN and END for function brackets.
As for the app, I'm still too ignant to know what I'm doing to make it properly. As a result, I wouldn't mind if someone warped ahead of me and finished it if anyone cared. It'll be another month before I start working on it (:P).
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: [Request/Idea]Auto-cloak fusions
Erroneous. Perhaps if you BEGIN to look at some Javascript code it will put an END to your ego.computerquip wrote:Also, Lua isn't in C++ or even similar to C or C++ for that matter. Lua is syntactically similar to Javascript with BEGIN and END for function brackets.
Re: [Request/Idea]Auto-cloak fusions
He got the lua part wrong, BEGIN is not a lua keywordcomputerquip wrote:Also, Lua isn't in C++ or even similar to C or C++ for that matter. Lua is syntactically similar to Javascript with BEGIN and END for function brackets.
http://www.lua.org/manual/5.1/manual.html#8