|
Joint Operations Anything about the Joint Operations series of games. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
Mapping: Something interesting
So, i am creating a single player map in JOE MED and ran accross an interesting problem, which lead to another interesting problem.
Listen and tell me if you have an explanation for this. So, using the WAC i need the game to throw a flashbang grenade from teleport target 6. Sounds easy enough, no? Using script: If eq(v9, 1) and never() then Ammo2tgt(grenadefb, 6) Endif ...Should throw the flashbang... and it does, until the flashbang detonates. When it detonates, the game completely crashes with a SYSDUMP. This happens only for the flashbang. HE grenade and smoke grenade will work just fine. So after fiddling with it and getting nowhere, i decided to try a different way to emit the grenade using AMMO2SSN(ammo, ssn). It worked, you can emit a flashbang from an object or an AI and it will detonate, scorching the eyes of you and everyone else around, yay! Theres only one problem. When using ammo2ssn, it seems to create an error in the wac. Anything past the line of script using ammo2tgt will not work. Heres the next weird thing, ammo2tgt WILL work without creating a wac error IF you use the trigger "if past (#)" and only this trigger. If you use any other trigger, it will cause an error in the WAC. This makes it useless to me because i need it to trigger after a specific event. So, strange problem recap: 1: a detonating flashbang will crash the game if emitted through ammo2tgt but not when emitted through ammo2ssn. 2: ammo2ssn will cause a WAC error if triggered with anything other than "past (#)" . Any ideas? |
#2
|
||
|
Quick update... just thought of a way to trigger this using only "past(#)" and a variable.
Create a wac script to set v10 (or whatever you need) to -1. Then use WAC script, If past(5) and past(v10) and never() then Ammo2ssn(grenadefb, 1800) Endif If past(5) allows enough time at the start of the map to set v10 to -1. Without this, the wac would immediately trigger the flashbang at the start of the map because all variables are 0 at the start. You could say use a premission event, but that won't work because the variable would still be set back to 0 at the start of the map. When you are ready for the flashbang to be triggered, creat a wac script or med event containing the desired conditions to set v10 to 0. At which point the WAC will be true and emit the grenade. This works without corrupting the WAC and the grenade will detonate without causing a sysdump. Recap: Create wac script: If elapse(0) and never() then Set(v10, -1) Endif If past(5) and past(v10) and never() then Ammo2ssn(grenadefb, 1800) Endif If ssnarea (10000, 5) and never() then Set(v10, 0) Endif |
#3
|
|||
|
Quote:
When using past (#) it seems to only clear the error when the script containing ammo2ssn is triggered. |
#4
|
||
|
Vars are clamped at 0 in the event editor but I've seen neg values work in the DFX2 wac but back to the issue....
As far as I know it takes at least 1 second for most instructions to take hold or have an effect. Keeping that in mind, the effects of past(30) with a var connected would trigger 31 seconds into the game. Try setting v10,1 or even v10,5 at the start to act as a buffer if need be. Then make it count backwards to trigger at 0 or whatever number by using dec (var) instead of set (var). eg... if never() then set(v10,1) endif if past() then dec(v10,1) or dec(v10) endif if eq(v10,0) and never() then set(v10,0) // to clamp your triggers and actions endif Last edited by Guest001; 02-09-2018 at 05:17 AM. Reason: GLITCHES |
#5
|
|||
|
Quote:
The variables arent really my problem. Really i was pointing out the bug with ammo2ssn. It seems to create a bug in the wac until it is triggered. Any ideas on another way that i could emit a flashbang from a teleport target or even an object and actually work without screwing something up? |
#6
|
||
|
Update: problem solved.
The script will work with ammo2ssn if you include a "end" after endif. If SSNAREA(ssn, area) and never() then Ammo2ssn(grenadefb, ssn) Endif End |
#7
|
||
|
Good find
|
#8
|
||
|
I'm saying it's a good find because usually, this is the way I would have tried it with end before endif...
Code:
if area(1) and never() then if lt(v50,0) then set(v64,1) elseif eq(v50,0) then set(v64,2) elseif gt(v50,0) then set(v64,3) end end end endif |
#9
|
||
|
Excuse me, but why would you do that? Lol
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|