Home   Help Search Login Register  

Author Topic: Dust...  (Read 788 times)

0 Members and 1 Guest are viewing this topic.

Knut Erik

  • Guest
Dust...
« on: 26 Aug 2003, 18:02:10 »
I've made a dust script that makes more dust for tanks. However there is one problem.
How can I make the script detect witch dirrection the tank is in.
Here is the script..

Code: [Select]
_tank = _this select 0
#start
@speed _tank > 8
#loop
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) + 1, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) + 2, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) + 3, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) + 4, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) - 1, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) - 2, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) - 3, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) + 0, (getPos _tank select 1) - 4, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]

drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) + 1, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) + 2, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) + 3, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) + 4, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) - 1, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) - 2, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) - 3, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [(getPos _tank select 0) - 3, (getPos _tank select 1) - 4, getPos _tank select 2] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , ""]
?speed _tank < 8 : goto "start"
?!alive _tank :exit
~0.1
goto "loop"

It is only a scap, but when the tank turns arround, the dust doesn't.

Can anybody help me with this problem ??

Komuna

  • Guest
Re:Dust...
« Reply #1 on: 26 Aug 2003, 18:21:46 »
I didn't see the script, anyway, the answer seems to be simple:

_tankDir = getdir Tank

drop[ ... [3*(Cos _tankDir,3*(Sin _tankDir),0] ... ]

It concerns to the relative position of the particles, according to the tank's position. I the last section of the array (where you wrongly imputted "") type the tank's name.

SheepOnMintSauce

  • Guest
Re:Dust...
« Reply #2 on: 26 Aug 2003, 18:21:57 »
Can you use a 'getdir' command in there somewhere to return the direction of the tank, and then use a 'setdir' of the dust to follow the direction of it?

Knut Erik

  • Guest
Re:Dust...
« Reply #3 on: 26 Aug 2003, 21:55:41 »
Can you show me an exsample ??  :P
How can I add more/less numbers, so that there will be smoke on bouth sides..

Thank you very mush for your help so far everyone  ;D

fragsta

  • Guest
Re:Dust...
« Reply #4 on: 26 Aug 2003, 22:08:09 »
where do u live eric? uk? if so well dun 4 gettin adsl! we must fight evil BT!


i will have a look at ur script wen im finished chattin on msn.....15 minutes.....it dont look 2 hard 2 do

fragsta

  • Guest
Re:Dust...
« Reply #5 on: 26 Aug 2003, 23:01:03 »
that script is fine how it is m8, no complaints here!

Knut Erik

  • Guest
Re:Dust...
« Reply #6 on: 27 Aug 2003, 16:28:36 »
Argh. I can't get it to work  :-\

Here is the line I use..

Code: [Select]
drop ["cl_basic" , "" , "Billboard" , 120 , 15 , [3*(Cos _tankDir,3*(Sin _tankDir),0] , [1.5,1.5,0] , 1 , 0.185 , 0.155 , 0 , [0.25,20] ,[[0.375044,0.35977,0.194726,0.75],[0.62,0.72,0.81,0],[0.62,0.72,0.81,0],[0,0,0,0.1]] , [0] , 0.2 , 0.2 , "" , "" , "_tank"]What is wrong now ??

And Fragsta, I live in Norway  ;)
« Last Edit: 27 Aug 2003, 16:29:08 by Knut Erik »

Knut Erik

  • Guest
Re:Dust...
« Reply #7 on: 28 Aug 2003, 14:07:57 »
*bump*

Knut Erik

  • Guest
Re:Dust...
« Reply #8 on: 01 Sep 2003, 14:41:24 »
*Bumb*

Please everyone  :-\
Someone must know how we do this!