Random questions
Moderator: Moderators
Random questions
To avoid opening several threads I'll post all my questions in this thread and mark them with *solved* as they get answered.
[solved]How can I rescale units (i.e. tanks bigger, units smaller)?
[partially solved]Where can I found the sound management scripts? For instance I'd like to disable the sound made by PeeWee when I issue a move order. Ideally i'd like it make the sound once in a while but since I think that's not possible I'd like to have it disabled for now.
Thanks
_______________________________________________________________
_______________________________________________________________
I'm making my first TASpring mod. So far I've modified one unit: Zipper (known also as ARMFAST). If someone wants to help me (beta) test the mod you can get it here:
http://www.proimpact.ro/download/TACTICS.sdz
I'm trying to take a tactical/simulation aproach. Any thoughts ideas are welcome.
BTW: If you download the mod use the Total War camera (Ctrl+J) otherwise it'll get frustrating pretty fast
[solved]How can I rescale units (i.e. tanks bigger, units smaller)?
[partially solved]Where can I found the sound management scripts? For instance I'd like to disable the sound made by PeeWee when I issue a move order. Ideally i'd like it make the sound once in a while but since I think that's not possible I'd like to have it disabled for now.
Thanks
_______________________________________________________________
_______________________________________________________________
I'm making my first TASpring mod. So far I've modified one unit: Zipper (known also as ARMFAST). If someone wants to help me (beta) test the mod you can get it here:
http://www.proimpact.ro/download/TACTICS.sdz
I'm trying to take a tactical/simulation aproach. Any thoughts ideas are welcome.
BTW: If you download the mod use the Total War camera (Ctrl+J) otherwise it'll get frustrating pretty fast
Last edited by pin_ on 02 Aug 2006, 10:59, edited 5 times in total.
gamedata\sound.tdf
Find the class the Peewee uses (you can look that up in units\armpw.fbi).
You could make it only play once in a while (for start/stop sounds at least) by doing this in the script:
That would make the sounds play 10 times for every thousand, on average. Of course, this is also per-unit, so if you have 1000 peewees with this you'll probably get 10 doing. Laws of probability and stuff. In any case, you'll want to search the forum for my thread about the "play-sound" operator; I made a lengthy topic about it a while back explaining how it works.
One thing to note if you use this method, however, is that when a player FPS's a unit, StartMoving is called every frame, meaning it's very likely the sound would get played at annoying times. There's no way to avoid this atm.
Find the class the Peewee uses (you can look that up in units\armpw.fbi).
You could make it only play once in a while (for start/stop sounds at least) by doing this in the script:
Code: Select all
StartMoving() {
var blah;
blah = rand(1,1000);
if(blah > 10) {
play-sound("startmovingsound",10);
}
}
StopMoving() {
var blah;
blah = rand(1,1000);
if(blah > 10) {
play-sound("stopmovingsound",10);
}
}
One thing to note if you use this method, however, is that when a player FPS's a unit, StartMoving is called every frame, meaning it's very likely the sound would get played at annoying times. There's no way to avoid this atm.
- unpossible
- Posts: 871
- Joined: 10 May 2005, 19:24
so can observers (eg spec/other players in a game) hear this drone? Does it lag like hell?Gnome wrote: One thing to note if you use this method, however, is that when a player FPS's a unit, StartMoving is called every frame, meaning it's very likely the sound would get played at annoying times. There's no way to avoid this atm.
Thanks!
Am I supposed to put that code in the sound script for PeeWee?
[EDIT] After some research I'd guess that goes in the COB files.
Gnome could you detail where should I pass that code for random sound or post a link to that topic you mentioned?Gnome wrote:gamedata\sound.tdf
Find the class the Peewee uses (you can look that up in units\armpw.fbi).
You could make it only play once in a while (for start/stop sounds at least) by doing this in the script:
That would make the sounds play 10 times for every thousand, on average. Of course, this is also per-unit, so if you have 1000 peewees with this you'll probably get 10 doing. Laws of probability and stuff. In any case, you'll want to search the forum for my thread about the "play-sound" operator; I made a lengthy topic about it a while back explaining how it works.Code: Select all
StartMoving() { var blah; blah = rand(1,1000); if(blah > 10) { play-sound("startmovingsound",10); } } StopMoving() { var blah; blah = rand(1,1000); if(blah > 10) { play-sound("stopmovingsound",10); } }
One thing to note if you use this method, however, is that when a player FPS's a unit, StartMoving is called every frame, meaning it's very likely the sound would get played at annoying times. There's no way to avoid this atm.
Am I supposed to put that code in the sound script for PeeWee?
Code: Select all
[ARMPW]
{
select1=servtny2;
ok1=servtny2;
arrived1=servtny2;
cant1=cantdo4;
underattack=warning1;
count5=count1;
count4=count2;
count3=count3;
count2=count4;
count1=count5;
count0=count6;
canceldestruct=cancel2;
}
[EDIT] After some research I'd guess that goes in the COB files.
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Since this thread is "Random questions" and I have a random question... it is possible to SHOW/HIDE pieces based on unit damage. Is it possible to enable and disable individual weapons? How about changing the fire arc based on unit damage?
Basically, I'm looking at making a mod that has infantry squads as its base unit, with 10 or 12 soldiers per squad, and HIDEing soldiers as the squad is damaged, disabling their weapons.
One more question:
Assume the squad is laid out in a box like this, where each letter represents a "soldier", and each "soldier" has a weapon attached to it.
FRONT
BACK
Now, if each soldier has a weapon that is arced toward the front, will all of the soldiers still be able to fire, despite the fact that IJKL and especially MNOP are firing through the majority of the squad? (Obviously I'm not concerned with graphics at the moment; squads will be small and bullets will be invisible, so it won't look too weird, hopefully.)
Basically, I'm looking at making a mod that has infantry squads as its base unit, with 10 or 12 soldiers per squad, and HIDEing soldiers as the squad is damaged, disabling their weapons.
One more question:
Assume the squad is laid out in a box like this, where each letter represents a "soldier", and each "soldier" has a weapon attached to it.
FRONT
Code: Select all
A B C D
E F G H
I J K L
M N O P
Now, if each soldier has a weapon that is arced toward the front, will all of the soldiers still be able to fire, despite the fact that IJKL and especially MNOP are firing through the majority of the squad? (Obviously I'm not concerned with graphics at the moment; squads will be small and bullets will be invisible, so it won't look too weird, hopefully.)
-
- Posts: 197
- Joined: 04 Nov 2004, 00:33
these can be done, i think. i know specifically that the gundams lose their shields after losing a certain %age of health so the show/hide thing is possible. this was looked into for the Epic 40k Mod that fell thru but squads were dropped cause when turning they would look really odd.Felix the Cat wrote:Since this thread is "Random questions" and I have a random question... it is possible to SHOW/HIDE pieces based on unit damage. Is it possible to enable and disable individual weapons? How about changing the fire arc based on unit damage?
Yes, it's part of the script, pin.
Oh, hell, didn't even notice the scaling bit before. No, you cannot scale pieces dynamically in game. The best you can do is copy-pasting the piece several times, then showing and hiding them in sequence.
Felix: As I answered in another topic recently, return FALSE; in a weapon's AimWeaponX() function to jam it. What the conditions for that jam are is up to you. Arcing like that shouldn't be a problem, I'm relatively sure units don't have a problem firing through themselves like that.
However, it's going to look like crap. The engine simply is not cut out for squad combat. It'll especially look bad if they ever get tossed into the air... They'll also all turn in a very unnatural fashion... imagine a tank with 16 spikes and how it would look when it turned.
And that's ignoring the massive amount of work which will be required to script this squad so they resemble humans at all...
[edit] much hate to you, j5
Oh, hell, didn't even notice the scaling bit before. No, you cannot scale pieces dynamically in game. The best you can do is copy-pasting the piece several times, then showing and hiding them in sequence.
Felix: As I answered in another topic recently, return FALSE; in a weapon's AimWeaponX() function to jam it. What the conditions for that jam are is up to you. Arcing like that shouldn't be a problem, I'm relatively sure units don't have a problem firing through themselves like that.
However, it's going to look like crap. The engine simply is not cut out for squad combat. It'll especially look bad if they ever get tossed into the air... They'll also all turn in a very unnatural fashion... imagine a tank with 16 spikes and how it would look when it turned.
And that's ignoring the massive amount of work which will be required to script this squad so they resemble humans at all...
[edit] much hate to you, j5
