Dr Schneckem awesome tattoo! 1up man :)
But true, you need the followmouse plugin for more realistic sensation.
Follow Mouse Plugin
<plugin name="followmouse" url="followmouseplugin.swf" keep="true" />
Then you need to add a Field that register clicks (since the pano can't). Just create an image of 1x1 px and stretch it 100%
|
Quellcode
|
1
|
<plugin name="shootingfield" onloaded="set(width, 100%); set(height, 100%) url="mask.png" keep="true" enabled="true" mousechildren="true" handcursor="false" onclick="shoot()"/>
|
the shoot action with sound using soundinterface (
sound interface plugin (beta))
|
Quellcode
|
1
2
3
4
|
<plugin name="soundinterface"
url="soundinterface.swf"
rootpath="."
/>
|
|
Quellcode
|
1
2
3
4
5
6
7
|
<action name="shoot">
addhotspot(bullethole);
set(hotspot[bullethole].ath, get(view.hlookat));
set(hotspot[bullethole].atv, get(view.vlookat));
set(hotspot[bullethole].url, bullet.png);
playsound(shot.wav);
</action>
|
something like that
And as extra
Rightclick to place bomb :P (instead of png you could use a swf with a blinking red light);
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<contextmenu fullscreen="false">
<item name="placebomb"
caption="Place the bomb"
onclick="placebomb()"
/>
<item name="disarm"
caption="Disarm the bomb"
onclick="disarm()"
/>
</contextmenu>
<action name="placebomb">
addhotspot(bomb);
set(hotspot[bomb].url, bomb.png);
set(hotspot[bomb].ath, get(view.hlookat));
set(hotspot[bomb].atv, get(view.vlookat));
playsound(thebombhasbeenplanted.wav);
startcountdown();
</aciton>
<action name="startcountdown">
playsound(teet.wav, 10);
wait(10);
playsound(boooooom.wav);
</action>
<action name="disarm">
if(get(view.vlookat) EQ get(hotspot[bomb].atv),
if(get(view.hlookat) EQ get(hotspot[bomb].ath),
removehotspot(bomb);
stopsound(teet.wav);
stopstound(booooom.wav);
);
);
</action>
|
I have no clue if any of this code works :P