Go Back   Novahq.net Forum > Games > Joint Operations

Joint Operations Anything about the Joint Operations series of games.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-07-2018, 01:14 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

eek 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?
Reply With Quote
  #2  
Old 02-07-2018, 01:47 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

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
Reply With Quote
  #3  
Old 02-07-2018, 03:25 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by Oscarmike247 View Post
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
Nevermind on this, had myself fooled into think this was working, but i overlooked something.

When using past (#) it seems to only clear the error when the script containing ammo2ssn is triggered.
Reply With Quote
  #4  
Old 02-08-2018, 11:48 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

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
Reply With Quote
  #5  
Old 02-09-2018, 07:02 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
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
Hey, thanks for the reply.

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?
Reply With Quote
  #6  
Old 02-10-2018, 07:16 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

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
Reply With Quote
  #7  
Old 02-10-2018, 02:25 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

Quote:
Originally Posted by Oscarmike247 View Post
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
Good find
Reply With Quote
  #8  
Old 02-10-2018, 02:35 PM
Guest001 is offline Guest001
Registered User

Join Date: Aug 2008
Posts: 4,971

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
Reply With Quote
  #9  
Old 02-10-2018, 11:40 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Originally Posted by stompem View Post
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
Excuse me, but why would you do that? Lol
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:27 PM.




Powered by vBulletin®