Camera command Issue

Do you need World Editor help? Ask here!
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
User avatar
I_H8_U_M8
Posts: 134
Joined: Wed Jul 02, 2008 5:57 pm
Location: Canada

Camera command Issue

Unread post by I_H8_U_M8 »

I decided to make a map on War3 Because I am taking a break from Java and C...
Anyways The problm I am getting is with my -cam command. The variables are being set correctly, but the camera is not panning. Help would be nice.
Attachments
Mafa Circle Td.w3x
(37.33 KiB) Downloaded 507 times

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Camera command Issue

Unread post by 3ICE »

Sorry, I'm on a very busy exam schedule right now, won't have spare time until Thursday next week (June 11th).

EDIT: Well, I do have enough time for checking one map :)

Comments:
Ripping off both Mafa TD and Green Circle TD is lame.
WTF is up with the Reveal trigger? Yes, it is too much... And the map should be revealed at map init anyway. And not with stupid visibility modifiers, but with t_vis Visibility - map fog off, and black mask off
WTF is up with the -name trigger? If someone asks: "How do I change my name?" then someone answers "You type -name <name here>", he will get an error message. Lame. He was just trying to help.
Why do you need "PreText"? Isn't "(Entered Chat String)" good enough for you?
"Text" is an unused variable.
Instead of stupid
t_cam Camera - Pan camera for (Triggering player) to (Target of current camera view) with height (Real(CamDistance[(Player number of (Triggering player))])) above the terrain over 1.00 seconds
, use clever
t_cam Camera - Set (Triggering player)'s camera Distance to target to (Real(CamDistance[(Player number of (Triggering player))])) over 0.00 seconds
. It is in the t_cam Camera - Set Camera Field (timed) action.

--3ICE
ImageImageImageImageImage
Image
ImageImage

User avatar
I_H8_U_M8
Posts: 134
Joined: Wed Jul 02, 2008 5:57 pm
Location: Canada

Re: Camera command Issue

Unread post by I_H8_U_M8 »

The Name Trigger Works Perfectly, And besides which You have done something like that yourself..
The Reveal command is just to be like mafa td.I am making this map because I KNOW PEOPLE WILL PLAY IT!
Btw I was redoing Mafa Td completly! Adding Extra Heros and Buiders and Towers also.
I dont need the pretext veriable or text variable but I expectedto need more variables for the editor.
Also I had only spent 15 min on that map... I will post later ver and thanks for answering the camera problem.
I understand you are also kinda tired because exampes.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Camera command Issue

Unread post by 3ICE »

Nope. However my command system also sucks, because it tells you that the command you entered was incorrect, even if you say things like "-.-" (which is a commonly used smiley).
Well mafa TD has it wrong then. Reveal must be at map init. We don't need to use commands like -setupcreeps -givemeabuilder -givememystartingresources -starttimerfornextspawn -spawncreeps -reveal, because they are all done automatically. (At least they should be...)
Redo from scratch is nice, but I don't believe you are going to also redo every tower and creep. Terrain is only 1% of the map. (Except when it also looks nice, like in some RPGs or cinematics, where terrain actually matters.)
Weird... Why would you need extra, useless variables? Guess what, Maze Designer only has 2 variables. A string (s) and a unit group (H). And it is a fully working map with over 6 hours of gameplay per game.
No problem, I'm here to help. :)
Nah, this is just my regular self. Being so negative and criticizing everything is who I am.
But you will fix all the things I mentioned, right?

--3ICE
ImageImageImageImageImage
Image
ImageImage

User avatar
I_H8_U_M8
Posts: 134
Joined: Wed Jul 02, 2008 5:57 pm
Location: Canada

Re: Camera command Issue

Unread post by I_H8_U_M8 »

Im Just wondering, but how could I fix the issue with moving units from region to region.
There are 2 triggers. 1 that Moves units from the spawn areas and 1 that makes the units travel in the circle. The problem is hen it gets over 200 units, the units stop moving...
How could I change this? I already revomed extra functions from the 2 triggers to increase The speed but It barly did nothing.
Attachments
Mafa Circle Td.w3x
(40.71 KiB) Downloaded 532 times

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Camera command Issue

Unread post by 3ICE »

Do they completely stop, or do they start lagging? (Short pauses, takes a while to respond to commands, etc)

Debugging a TD's Movement system is really simple. Make the creeps spawn for you (Player 1) and see what order they are currently carrying out.
ImageImageImageImageImage
Image
ImageImage

User avatar
I_H8_U_M8
Posts: 134
Joined: Wed Jul 02, 2008 5:57 pm
Location: Canada

Re: Camera command Issue

Unread post by I_H8_U_M8 »

I cant explain you need to test the map your self because I wouldn't know how to improve.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Camera command Issue

Unread post by 3ICE »

You still have -reveal, -name, and -cam wrong.

You have some of your triggers in JASS, for no apparent reason? Remember, converting to jass does exactly nothing, unless you also edit the code and make it faster by removing BJ functions, organizing conditions better, etc.
Things I marked in red are BJ functions and slow you down: image

Your best shot would be deleting the Unit Spawn folder and redoing everything as instructed in the TD tutorial.
ImageImageImageImageImage
Image
ImageImage

User avatar
I_H8_U_M8
Posts: 134
Joined: Wed Jul 02, 2008 5:57 pm
Location: Canada

Re: Camera command Issue

Unread post by I_H8_U_M8 »

WELL IF YOU LOOK YOU'D SEE I EDITED THE TWO TRIGGERS! PAY ATTENTION! :x I removed 2 functions from eash Jass file the two functions only ruturned true or false so i just moved the if condition and deleted the extra functions but Me Never using the language I dont Know what to do. Now Can you help me Fix the unit movement problem?! :roll:

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Camera command Issue

Unread post by 3ICE »

Yelling for no reason?
How would I know you edited it? There was nothing to compare it to.
Pay attention to what exactly?
"Eash" what?
"JASS File" means what?
"Ruturned" what?

Let me fix your post:
I_H8_U_M8 wrote:I am sorry for not telling you what I edited in the JASS code.
I am sorry for converting a gui trigger to jass without making a copy of the gui trigger so you can see what it looked like before the conversion.
I will heed your advice and redo the triggers from scratch, following the tutorial you linked.
I am sorry for thinking that optimizing equals moving the condition.
I understand that I not even misthought, but also did that condition moving part wrong.
I am deleting the Unit Spawn folder right now.
Either learn jass for real or leave it alone entirely.

EDIT:
Your version: if (( condition == true ) ) then
My version: if(condition)then
First of all, never put anything in double brackets. ((x+1)) = (x+1) Got it?
And comparing a boolean to true is the same as just using that boolean, without the comparison. Think of it like this:
Example Example
function IsGameOver takes nothing returns boolean     return level==40 endfunction function example takes nothing returns nothing     if(IsGameOver()==true)then         BJDebugMsg("IsGameOver() will either be true or false. Comparing true to true is pointless, comparing true to false is also pointless.")     endif     if(IsGameOver())then         BJDebugMsg("Good.")     endif endfunction
Why do you need periodic events for a simple move trigger?
Use the t_uni Unit Enters event and the t_uni Issue Point Order action.

EDIT2: Your trigger fails over 200 units because your main loop needs to check like 6000 units, due to poor structure. This is too much work for a trigger that runs twice a second.
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 118 guests