HAARP controller

GXcqWWW.png

Mod that allows you to control time of day in the game by using this melee gun. Based on Idol Ninja's Sandbox+
 

Attachments

  • haarp.vpp_pc
    1 MB · Views: 948
Last edited:
How do you assign commands to weapons?
Remember my SupperHawt script? It also included a mock-up weapon to toggle the effect on and off, check the code:
Code:
function sh_trigger_thread()
    -- MAKE SURE THAT SUPPERHAWT CAM IS EQUIPPED AND WE'RE NOT IN STORE MENU
    if inv_item_is_equipped("SupperHawt_Cam", LOCAL_PLAYER) and not store_interface_is_active() then

        -- LET THE PLAYER DECIDE WHETHER THEY PREFER TIMER MODE OR INFINITE MODE
        if TIMER_SWITCH then
            hud_prompt(LOCAL_PLAYER, "SH_TRIGGER_TIMER", "sh_trigger_infinite")
        else
            hud_prompt(LOCAL_PLAYER, "SH_TRIGGER_INFINITE", "sh_trigger_timer")
        end

        -- TOGGLE SUPPERHAWT EFFECT WHEN PLAYER PULLS THE TRIGGER
        if player_action_is_pressed("CBA_OFC_ATTACK_PRIMARY") then
            if not TRIGGER_PUSHED then
                if SUPPERHAWT_SWITCH then
                    SUPPERHAWT_SWITCH = false
                else
                    SUPPERHAWT_SWITCH = true
                    if TIMER_SWITCH then
                        if not TIMER_TUTORIAL then
                            mission_help_table("SH_TIMER_TUTORIAL", SYNC_LOCAL)
                            TIMER_TUTORIAL = true
                        end
                    end
                end
                TRIGGER_PUSHED = true
            end
        else
            TRIGGER_PUSHED = false
        end

        -- TOGGLE CUSTOM MUSIC WHEN PLAYER PRESSES THE RELOAD BUTTON
        if player_action_is_pressed("CBA_OFC_PICKUP_RELOAD") then
            if not RELOAD_PUSHED then
                if SUPPERHAWT_MUSIC then
                    SUPPERHAWT_MUSIC = false
                else
                    SUPPERHAWT_MUSIC = true
                end
                RELOAD_PUSHED = true
            end
        else
            RELOAD_PUSHED = false
        end
    end
end
 
Thats strange.If i delete the haarp from mod folder my gps mod stops working.
If both are installed together gps mod works fine but haarp mod doesn't change TOD.
 
Thats strange.If i delete the haarp from mod folder my gps mod stops working.
If both are installed together gps mod works fine but haarp mod doesn't change TOD.
1) your thread has the same name as mine
2) your function has the same name as mine
For HAARP
function function_with_my_code()
my_thread_manager()

Before I wasn't sure about names conflict but I test it and it's really exist, so I recommend you to make your function's names uniq, add your nick to it to them or so.
 
1) your thread has the same name as mine
2) your function has the same name as mine
For HAARP
function function_with_my_code()
my_thread_manager()

Before I wasn't sure about names conflict but I test it and it's really exist, so I recommend you to make your function's names uniq, add your nick to it to them or so.
I thougt about that and changed the thread manager name and functuon names but it was the same behavior but i will try it again and post result here.Maybe it is the same with string names i didnt check the strings all my strings are named MSG_XXXXX?I dont understand that even if the mods have the same name why doesnt my mod work if yours isnt installed?Is this causing by the way the workshop patch works? Or is that the modified lua interpreter?
 
Last edited:
Changed all names but then the mod stops working at all neather with nor without haarp.Haarp is working.Without changing names gps works but haarp cant change tod.Cant understand it.
 

Attachments

  • gps_plusca.vpp_pc.runs_with_haarp_but_not_without.vpp_pc
    100.7 KB · Views: 479
  • gps_plusca.vpp_pc.changed_names_not_working_at_all.vpp_pc
    100.7 KB · Views: 548
Last edited:
Changed all names but then the mod stops working at all neather with nor without haarp.Haarp is working.Without changing names gps works but haarp cant change tod.Cant understand it.
As I said you are using same thread name
upload_2018-5-12_11-50-52.png

If after renaming HAARP Still doesn't work, maybe another mod is using same thread name
 
Back
Top