Staredit Network > Forums > Modding Assistance > Topic: Cast Mind Control and fire a weapon
Cast Mind Control and fire a weapon
May 9 2009, 8:40 pm
By: Praecipitator  

May 9 2009, 8:40 pm Praecipitator Post #1



Idea: a spell what will give you an enemy unit for a few seconds, after that the unit explodes, dealing splash damage.
For that, i wanted to cast mind control and fire a weapon, which has a lot of wait in it's iscript (like a time bomb).

Now I noticed that
-I can't "useweapon [id of mind control]" in a spellcasting animation, sc crashes.
-Mind Control uses no spellcast animation where i could use "useweapon [id of my weapon]", even if datedit says otherwise.

is there a way to accomplish this effect? maybe with missile iscript? I experimented with sigorder a little, like
sigorder 182 #id of mind control order
castspell
it simply does nothing (i gave the unit even the regular mind control buttion to see if it has the requirements to cast this spell)

Post has been edited 1 time(s), last time on May 9 2009, 10:47 pm by Praecipitator.



None.

May 9 2009, 9:34 pm BiOAtK Post #2



You can't. Mindcontrol is hardcoded.



None.

May 9 2009, 9:43 pm Corbo Post #3

ALL PRAISE YOUR SUPREME LORD CORBO

...You're saying that useweapon 105 doesn't work?

Cause I'm pretty sure that "useweapon: mind control" will never work.



fuck you all

May 9 2009, 10:44 pm Praecipitator Post #4



hm. that sucks :/
Quote from Corbo
...You're saying that useweapon 105 doesn't work?

Cause I'm pretty sure that "useweapon: mind control" will never work.
lol of course. i was too lazy to look up the id, and I thought it was clearer that way.
edit: i guess i should have written: useweapon [mind control id]

hm. can you use "useweapon" in a missile's iscript, or would it appear at the top left(?) corner, like if using it in an idle animation?



None.

May 9 2009, 10:57 pm Corbo Post #5

ALL PRAISE YOUR SUPREME LORD CORBO

Hmmm, not sure but I think you have to use useweapon on a header that's created by an action, spellcasting, attacking, etc.



fuck you all

May 10 2009, 3:47 am Biophysicist Post #6



Put the useweapon in the unit's castspell (or attack, depending on which one you want it for) animation, not in the missile's script.

Also, iscript does EXACTLY what you tell it to. You don't need to give the unit the button for a spell if you want to useweapon the spell... O_O



None.

May 10 2009, 12:13 pm Dominus Sacerdus Post #7



Quote from Praecipitator
Idea: a spell what will give you an enemy unit for a few seconds, after that the unit explodes, dealing splash damage.
For that, i wanted to cast mind control and fire a weapon, which has a lot of wait in it's iscript (like a time bomb).

Now I noticed that
-I can't "useweapon [id of mind control]" in a spellcasting animation, sc crashes.
-Mind Control uses no spellcast animation where i could use "useweapon [id of my weapon]", even if datedit says otherwise.

is there a way to accomplish this effect? maybe with missile iscript? I experimented with sigorder a little, like
sigorder 182 #id of mind control order
castspell
it simply does nothing (i gave the unit even the regular mind control buttion to see if it has the requirements to cast this spell)

Ok, here is my idea on how I would make such a spell. Use it, modify it, or call me a n00b or an idiot, idc.

STEP 1: Copy a weapon of arclite shock cannon into a slot 121 and set it to instant kill (10000) and it max it range (without crashes)


STEP 2: Edit the spellcasting animation:

UnitUnknownWTFCastSpell:
nobrkcodestart
playfram blabla
wait 3
#etc..
cast spell
wait 60
useweapon 121
nobrkcodeend
goto #whatever

STEP 3: In Firegraft, add a button to the unit you want to give this hardcore attack, set its icon to something even more hardcore, and give it action: use tech #mind control ID here.

That's step 4 compile into exe, run the fucking game, ye know the deal..

So basically what this does, is giving a unit a mind controlling spell, which has into its animation programmed, to wait 6 seconds and then use a weapon with unlimited range that explodes on the target.

Notice that there are 2 side effects with this method:
1) You can only give that to a unit that doesn't use any other spells (spellcasting animation)
2) The casting unit will freeze during the mind controlling time

Post has been edited 1 time(s), last time on May 10 2009, 12:19 pm by Dominus Sacerdus.



None.

May 10 2009, 12:31 pm Dominus Sacerdus Post #8



A more advanced would be though to create a subunit with single animation that is invisible, and has only 2 iscript entry
that goes something like:

SubunitWTFIdle:
wait 125
goto SubunitWTFIdle

SubunitWTFCastSpell:
nobrkcodestart
castspell
wait 60
useweapon 121
nobrkcodeend
goto SubunitWTFIdle



None.

May 10 2009, 1:45 pm Praecipitator Post #9



mind control does not use any spell casting animations, as i said in my first post here....



None.

May 10 2009, 2:44 pm Dominus Sacerdus Post #10



Quote from Praecipitator
mind control does not use any spell casting animations, as i said in my first post here....




Are you completely sure? In DatEdit, it says it uses regular animation (CastSpell). Also did you get to make useweapon 105 work succesfully?
Cause if it does, you can use a spell that DOES use spellcasting animation, and put "useweapon 105" instead of "cast spell", that's it.

P.S. if you can't make mind control work via these methods, you cannot do it at all.

Post has been edited 1 time(s), last time on May 10 2009, 2:52 pm by Dominus Sacerdus.



None.

May 10 2009, 3:11 pm Symmetry Post #11

(Killer_Kow)

Quote from Praecipitator
-I can't "useweapon [id of mind control]" in a spellcasting animation, sc crashes.
-Mind Control uses no spellcast animation where i could use "useweapon [id of my weapon]", even if datedit says otherwise.

Please refrain from posting without reading and comprehending what has already been posted.

Mind Control is one of those tricky BW hardcoded spells that you can't really do all that much with.



:voy: :jaff: :voy: :jaff:

May 10 2009, 4:15 pm Praecipitator Post #12



thank you, killer_kow.

mh... i guess the only way here would be some kind of firegraft magic...

just played with the mind control overlay's iscript
adding domissiledmg -> crash
but, adding useweapon 30 (yamato gun) actually worked! the yamato sprite appeared over the targeted unit, but it dealt no damage....



None.

May 10 2009, 4:37 pm Symmetry Post #13

(Killer_Kow)

Use an 'appear on target' behaviour weapon instead of Yamato gun.



:voy: :jaff: :voy: :jaff:

May 10 2009, 8:38 pm Dominus Sacerdus Post #14



What about setting effect of a weapon entry to "Mind Control", and using this weapon instead of 105?



None.

May 10 2009, 9:27 pm Praecipitator Post #15



tried that, too. you get the "CBullet: Damage" error, if you do that, just like if you try to give a unit mind control as a weapon, or do useweapon 105



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:56 am]
Heinermann -- who decided "we're not necessarily anti-bot"? It's worse than spam, it's social engineering to trick people into believing that they are legitimate and get them to click their links
[06:04 pm]
NudeRaider -- ihjel
ihjel shouted: "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
ihjel
ihjel shouted: "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
it's rather inconvenient actually, as it requires you to transfer it to Custom Score which might even interfere with what you're measuring. But IIRC you can also use EUDs to display it which by now could actually be somewhat convenient.
[2026-11-11. : 9:25 pm]
ihjel -- "Use Display Text Message or the in-game Leaderboard to output the live values of critical Death Counters." that would be so convenient wouldn't it.
[2026-11-11. : 6:59 pm]
Symmetry -- I just pasted what google ai told me to try to form a feedback loop
[2026-11-11. : 1:24 pm]
NudeRaider -- UndeadStar
UndeadStar shouted: https://staredit.net/topic/18961/ <= wow, if there wasn't a capital letter on almost every word in the title, and a link in the signature, I may not have guesses it's an AI bot. I don't know much about map editing, but the content may even be relevant enough to be kept.
Yeah, I've noticed it, but it raised a couple of relevant questions and kept the ad to the signature so if someone were to engage with the topic it could be a net positive which is why I kept it. We're not necessarily anti-bot, just anti-spam. Thanks to Symmetry who realized my hope. :)
[2026-11-11. : 8:09 am]
Zycorax -- Greed
[2026-11-11. : 3:25 am]
Symmetry -- why do the oligarchs want our mapping strategies???
[2026-11-11. : 3:24 am]
Symmetry -- the question is why though
[2026-11-11. : 1:10 am]
Butch -- made me feel really sad and stupid and fat
[2026-11-11. : 1:10 am]
Butch -- I got duped by one and replied and then realized after
Please log in to shout.


Members Online: Roy, MorwennaHadfield498, CerysAshdown772