Not yet, needs rework. Your firepoint needs to have two vertices pointing in the direction you want to fire.Snipawolf wrote:We can fire weapons using scripts?
Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
You do know how to get most of your questions answered, do you?
http://taspring.clan-sy.com/phpbb/search.php
http://taspring.clan-sy.com/phpbb/search.php

- Alex_Murdock
- Posts: 10
- Joined: 24 Oct 2006, 19:08
Yes there are functions which get called when under attack. HitByWeapon() for instance.
Now I've got a question... it's like this:
I've got a unit with a burst weapon which fires twice each burst (dual rocket launcher). So the question is, is there any other function which gets called each time a weapon fires a burst shot? Both FireWeaponX and EndBurstX get only called at the end of a burst which is useless.
The only workaround I can think of is abusing RockUnit, because it's the only function which gets called for any shot fired. Though I don't know if it got called when the unit was hit by a weapon as well. I read somewhere that both RockUnit and HitByWeapon are called then...
All I want to do is distribute the two shots over two firepoints (AND spawning muzzle flashes and extra fancy stuff like exhaust smoke and fire
) without relying on scripted reload times or using two weapons and slaving the second to the first AND scripting a delay in. That's entirely possible but it's ugly. I'd rather have one manageable weapon for which I don't need to recompile the script each time I want to change the reload time.
Now I've got a question... it's like this:
I've got a unit with a burst weapon which fires twice each burst (dual rocket launcher). So the question is, is there any other function which gets called each time a weapon fires a burst shot? Both FireWeaponX and EndBurstX get only called at the end of a burst which is useless.
The only workaround I can think of is abusing RockUnit, because it's the only function which gets called for any shot fired. Though I don't know if it got called when the unit was hit by a weapon as well. I read somewhere that both RockUnit and HitByWeapon are called then...
All I want to do is distribute the two shots over two firepoints (AND spawning muzzle flashes and extra fancy stuff like exhaust smoke and fire

Um, instead of having the weapon return(TRUE), have it fire the weapon in question via emit-sfx and then sleep.
As for compiling every time you want to change the delay... er, sorry, but that's a big problem... why? I mean, by the time you get everything else synched up timing-wise, you're hardly going to want to futz with something that minor, when you can just change the damage/AOE and balance that way. Just a thought.
As for compiling every time you want to change the delay... er, sorry, but that's a big problem... why? I mean, by the time you get everything else synched up timing-wise, you're hardly going to want to futz with something that minor, when you can just change the damage/AOE and balance that way. Just a thought.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Will that mean that i will have to remove the sounds from the sound class so i don't get double sounds?rattle wrote:Use play-sound("sample", volume) in StartMove() or StopMove() in the unit script. Select sound can't have multiple sounds.
Does the StartMove() gets activated anytime we give a move order or only when it was stoped and starts to move?
StopMove() gets called when the unit really stops, not just when you hit the button or key. Same for StartMove(). Yes you need to remove the sounds from the tdf.
Hm Argh using emit-sfx for that is not good at all because it's ignoring stuff like smoke trails on missiles. It would be so cool if we could control the when-a-unit fires stuff completely by script.
Think I'll just use a slaved weapon and time it myself
Hm Argh using emit-sfx for that is not good at all because it's ignoring stuff like smoke trails on missiles. It would be so cool if we could control the when-a-unit fires stuff completely by script.

Think I'll just use a slaved weapon and time it myself