
1°) Un hélicoptère en brush
A) L'hélicoptère
Alors là, je laisse court à votre imagination pour monter un hélicoptère digne de ce nom

transformez ensuite la totalité du véhicule en func_physbox (sauf les hélices, mais on y reviendra après)
>> func_physbox <<
name: helicoptere
x- flag -x
tout décoché sauf: "generate output on +USE"
B) L'(es) hélice(s)
faites votre/vos hélice(s), puis transformez les en func_rotating
>> func_rotating <<
name: helice_1, helice_2 ...
parent: helicoptere
max rotation speed: selon la vitesse que vous désirez
friction: 20
rotation sound wav: selon votre choix (exemple: Canals.d1_canals_01_chopper_rotor2)
bloking damage: 100
x- flag -x
|X| start on si vous désirez que l'hélicoptère soit toujours en marche
|X| X et/ou Y selon le sens de rotation que vous avez choisit pour votre hélice
|X| large sound radius
C) Les entités
maintenant, passons au chose sérieuse, il va vous faloir mettre en point entity la liste suivante:
-game_ui: 1
-logic_compare: 3
-phys_thruster: 5
-phys_keepupright: 1
tout ceci sera "actionné" par un func_bouton
>> game_ui <<
name: helicoptere_ui
field of view: -1.0
x- flag -x
tout coché
>> logic_compare n°1 <<
name: helicoptere_compareX
initial value: 0
compare value: 0
>> logic_compare n°2 <<
name: helicoptere_compareY
initial value: 0
compare value: 0
>> logic_compare n°3 <<
name: helicoptere_compareZ
initial value: 0
compare value: 0
>> phys_thruster n°1 <<
name: helicoptere_thruster_backward
attached object: helicoptere
time of force: 0
force: 180
x- flag -x
| | ignore pos
| | start on
|X| apply force
|X| apply torque
|X| orient locally
|X| ignore mass
>> phys_thruster n°2 <<
name: helicoptere_thruster_up
attached object: helicoptere
time of force: 0
force: 920
x- flag -x
| | ignore pos
| | start on
|X| apply force
|X| apply torque
| | orient locally
|X| ignore mass
>> phys_thruster n°3 <<
name: helicoptere_thruster_left
attached object: helicoptere
time of force: 0
force: 110
x- flag -x
| | ignore pos
| | start on
|X| apply force
|X| apply torque
|X| orient locally
|X| ignore mass
>> phys_thruster n°4 <<
name: helicoptere_thruster_right
attached object: helicoptere
time of force: 0
force: 110
x- flag -x
| | ignore pos
| | start on
|X| apply force
|X| apply torque
|X| orient locally
|X| ignore mass
>> phys_thruster n°5 <<
name: helicoptere_thruster_forward
attached object: helicoptere
time of force: 0
force: 320
x- flag -x
| | ignore pos
| | start on
|X| apply force
|X| apply torque
|X| orient locally
|X| ignore mass
>> phys_keepupright <<
name: rien
pitch yaw roll: 0 0 0
target entity: helicoptere
angular limit: 100
x- flag -x
tout décoché
>> func_button <<
mettez le où vous voulez (le mieux étant bien évidemment le cockpit
)il peut même être à l'extérieur de l'hélicoptère si vous voulez que ce dernier soit pilotable comme un télécommandé
D) Les Outputs
>> func_button <<
On in > helicoptere_ui > activate
>> helicoptere_ui <<
X axis > helicoptere_compareX > set value compare
Y axis > helicoptere_compareY > set value compare
attack axis > helicoptere_compareZ > set value compare
>> helicoptere_compareX <<
on equal to > helicoptere_thruster_left > deactivate
on equal to > helicoptere_thruster_right > deactivate
on greater than > helicoptere_thruster_right > activate
on greater than > helicoptere_thruster_left > deactivate
on less than > helicoptere_thruster_left > activate
on less than > helicoptere_thruster_right > deactivate
>> helicoptere_compareY <<
on equal to > helicoptere_thruster_backward > deactivate
on equal to > helicoptere_thruster_forward > deactivate
on greater than > helicoptere_thruster_forward > activate
on greater than > helicoptere_thruster_backward > deactivate
on less than > helicoptere_thruster_backward > activate
on less than > helicoptere_thruster_forward > deactivate
>> helicoptere_compareZ <<
on equal to > helicoptere_thruster_up > deactivate
on greater than > helicoptere_thruster_up > activate
et voilà, c'est finit
[align=center]2°) Un hélicoptère avec un model[/align]
Si vous avez un model d'hélicoptère (ou de n'importe quoi d'autre que vous désirez voir voler ^^) mettez le bouton dans le cockpit de ce dernier et faite exactement la même chose que tout le tuto du dessus

quelques models d'hélicoptère pour les flemmards de la recherche

attention, je ne les ais pas vérifier, mais il y a les bons dossiers d'après la description

http://www.garrysmod.org/downloads/?a=view&id=2700

http://www.garrysmod.org/downloads/?a=view&id=24296

http://www.garrysmod.org/downloads/?a=view&id=2226

http://www.garrysmod.org/downloads/?a=view&id=22189

voili voilou






pourtant j'ai verifier j'ai fais exactement se que tu as dis dans ton tuto 