• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Need an experienced eye

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
Hello.

I am nearly finished with my custom race map. It is not an advanced map, it only features a few triggers. However I have one jass-script in my map. But the jass-script is the most important trigger on my map.

The script is not advanced but for some reason it does not work in my map althought the authour of the script says that it shall work!

I think that there is something wrong with my editor, I use newgen-editor but I have a feeling that it is a bit buggy on my computer.

I wonder if someone has the time and energy to have a look at my script to see if it really works the way it shall?
 
Level 10
Joined
Nov 5, 2008
Messages
536
That's the spirit! :D

Here comes the triggers:

  • Game Camera
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call CameraForPlayers()

JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function PlayerGroupCamera takes nothing returns nothing
    call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, 2050, 0.00)
endfunction

function CameraForPlayers takes nothing returns nothing
    local timer t = CreateTimer()
    call TimerStart(t, 0.1, true, function PlayerGroupCamera)
    set t = null
endfunction

This trigger is supposed to keep the game zoomed out. My game really needs a constantly zoomed out game-view for all players.
What do you think about it?
 
Level 6
Joined
Jun 4, 2009
Messages
91
ok. where did you placed the script ?

write custom function in a trigger allow only this trigger to call the function (or JNGP can give access, if they've been created in the right order : the function trigger before, the caller trigger after). There is a place custom script : in the trigger editor, click on the name of the map (up to other triggers, like a folder, but with the map icon), then place your custom script in. Every trigger will be able to call functions at this place.
 
Level 10
Joined
Nov 5, 2008
Messages
536
Thanks! I did not not know that I should place that script there. Now it works fine. I kinda pasted the script right in the trigger-field, in some way : /

But since I can not try this map in multiplayer yet, do you think this scripts effects all players and not just player 1? (thats me in single player!)

If a player observes a game played on this map, do you think the observer sees the game with the normal game camera or via this script?
 
Status
Not open for further replies.
Top