Thanks Tom!
Also, theres an error in the script when i try to run all the Arty stuff. Can you tell me what the problem is? I simply copied and pasted the script you provided me. Perhaps theres a problem with my
local.player = parm.other stuff? i have it twice in the script, once in the prespawn and once in the spawn under ArtySupport:
~EDIT~
I made it so that the $Arty_Shell blows up after i walk off of the trigger but i set the origin to a fixed 0 0 50.
Now attempting to get it at players position...
~EDIT~
Apparently the local.ArtyShell is ignoring local.ArtyShell.origin completely. I just realized that no matter what i set the origin to, its always at 0 0 0.
Attempting to fix origin register problem
~EDIT~
Ok i got it to work using the local.ArtyShell.origin and it now blows up on cue. BUT, it always blows up where the player walked into it rather than where they are at the time, so i enter the trigger on side A and exit on side B but side B blows up. If i enter on side A and exit one side A, side A blows up, so it definatly is blowing up where the player triggered it from.
Attempting to correct...
~EDIT~
Ok now i dont understand it at all... I walked onto the bridge and then jumped off the side and it blew up where i had stepped onto the bridge. I then killed myself via Console "kill", respawned, walked back onto the bridge, walked off the other side normally, and it blew up where i had jumped off...
~EDIT~
Ok, the first series of numbers is My origin and the second series of numbers is the $Arty_Shell origin:
Code: Select all
0) (41.609283, 144.696930, 0.125002) | (0.000000, 0.000000, 0.000000) // (My origin at triggering | $Arty_Shells origin at triggering)
1) (27.189257, -154.028152, 0.124998) | (27.189257, -154.028152, 0.124998) // (My origin at trigger release | $Arty_Shells origin at trigger release)
P.S. I deleted all my old codes from the post becase they were just extra spam takeing up space in here...
P.P.S A very nice electrical storm just kicked up (Lighting and thunder)
~EDIT~
Ok i better get to bed, i have to wake up in 3 and a half hours...
Code so far...
Code: Select all
main:
level waittill prespawn
local.ArtyShell = spawn script_model "targetname" "Arty_Shell"
local.ArtyShell model "animate/fx_mortar_dirt.tik"
local.ArtyShell.angles = (0 0 0)
local.ArtyShell.scale = 1
level.count = 0 //integer to count how many times the explosion takes place
$Corona hide
thread CoronaOps
level waittill spawn
end
CoronaOps:
while(1)
{
$Bridge waittill trigger
local.player = parm.other
$Corona show
$CoronaLight light 1 0 0 350
iprintln (level.count + ") " + local.player.origin + " | " + $Arty_Shell.origin)
while (local.player istouching $Bridge)
{
waitframe
}
$Arty_Shell.origin = local.player.origin
$Arty_Shell anim start
level.count ++ //add one to the current value of level.count
iprintln (level.count + ") " + local.player.origin + " | " + $Arty_Shell.origin)
$Corona hide
$CoronaLight light 0 0 0 100
waitframe
}
end
What the script does:
When i step into the triggerMultiple labled "Bridge" it prints out a message on the left hand side of the screen telling me My origin and the explosions origin but it doesnt show the explosion yet, Then when i step out of the triggerMultiple it prints out the same message only my origin and the explosions origin are a little more updated and it also shows the explosion.
Current standing errors:
Although the explosion origin is a little more updated when I exit the trigger multiple it is always one step behind me rather than right on me when i exit the trigger.