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

Dungeon Master

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

Dungeon Master

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.
[07:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
Please log in to shout.


Members Online: Wing Zero