Another Newb Q or 2

=LIFT=

Member!
Joined
Oct 10, 2003
Messages
81
Reaction score
0
Website
Visit site
so... how do we create our own switches???

or... these are pre-made and we got no choice?

also... we can write the AI programs for computer behaviour right??
where we go to do this?

thanks in advance for your patience with a newb (me!)
=LIFT=
 

jjjjkk

Member
Joined
Feb 22, 2005
Messages
6
Reaction score
0
Location
Inner Circle of Hell
Ok, your talking about triggers or switches? Im not quite sure. If you need help with triggers post what you want to do and I'll post the right triggers :madatu

Sorry, got to edit this, I wasn't really looking at question...there is alot you can do with the right utilities. And you can modify the computers A.I. to a point but that is a very far point! If you want Ill send you a map i made that it takes very good players to beat it, you can also check the scripts and triigers to help you
 

Lwek

Member!
Joined
May 18, 2003
Messages
4,487
Reaction score
0
Website
www.Battleforums.com
=LIFT= said:
so... how do we create our own switches???

or... these are pre-made and we got no choice?

also... we can write the AI programs for computer behaviour right??
where we go to do this?

thanks in advance for your patience with a newb (me!)
=LIFT=
Do you know how to use switches? There are 256 switches you can use.

SWITCH
A switch is a simple on/off variable. Using switches allows you keep track of which triggers have been used or to keep a trigger from activating several times simultaneously if multiple players meet the conditions at the same time.

SWITCH IS SET
This allows you to test whether a specific switch is in the ‘Set’ state or the ‘Cleared’ state.
Copyright © 1997 Blizzard Entertainment. All Rights Reserved.
What are switches?
Switches are analogous to Boolean values in programmer parlance. Essentially, they are used to indicate either an "on" or "off" condition. You can use them however you like. They are most useful for preserving state across triggers. You might, for example, set a switch if a certain hero is killed if you want to defer taking action on it until a later time. Then, you could test the state of that switch to see if it was "set" or "reset", even though the event that caused to be set might no longer be detectable.
 

-Azrael666-

BattleForums Senior Member
Joined
Jan 19, 2005
Messages
2,986
Reaction score
3
I usually only use switches for randomizing things. Modifying death counts and then using the 'Deaths' condition is much more efficient than switches ever could be, since it can work for individual players.
 

Lwek

Member!
Joined
May 18, 2003
Messages
4,487
Reaction score
0
Website
www.Battleforums.com
Yeah, I use death counts as my switches now. There's also an 'infinite' amount of death counts you could use.
 

=LIFT=

Member!
Joined
Oct 10, 2003
Messages
81
Reaction score
0
Website
Visit site
yes.. that map was most enlightening....

i had the right idea... but.. hehe... i din' figure out the back end
completely.... it was nice... just accumulate bunches of deaths
and eliminate them 1 at a time.

now... i guess that map was made for illustrative purposes???

cuz... we could use that Kill Units at Location action instead right??
woudlnt' that actually be faster than using the cannons??
(cuz before this map.. i didn't know you could actually move/create
locations midgame.... but.. i shudda known you could from the
way an arbiter works and looking at the properties of locations)

kool beans.

now... let's switch to SWITCHES! :shocked

you mentioned there are exactly 256 switches.
i noticed a list but... some have names and some dont.
i was assuming the "empty" slots were blanks and we
can create a check for a specific switch.? no?
maybe these arent' as useful as they seem?

=LIFT=
 

-Azrael666-

BattleForums Senior Member
Joined
Jan 19, 2005
Messages
2,986
Reaction score
3
Using "Kill units at location" doesn't increase the Kill variable. Only actual slaughter does.

The named switches are the ones that are renamed. Select a switch and press "Rename" inorder to change the name of a switch.

In actions, there is a trigger to Set and Clear switches (Set Switch). In conditions, there is a trigger to check switches (Switch). Using these, you can tell if certain triggers are in effect or not. But like Lwek said, using deaths gives you an infinite number of switches, it's just that they can't randomize, so switches are still useful in that aspect.
 

=LIFT=

Member!
Joined
Oct 10, 2003
Messages
81
Reaction score
0
Website
Visit site
1. ok... kill location dont work cuz... it doesn't kill "for" some player.
it just kills stuff "of" some player.

2. ahhh... so... ok.. i get the switches....
they aren't triggers or combinations of triggers.. they just HELP you say...
if [something] is true or not.

like...

condition: X happened.
action: set switch#31.

then, you can cancel the switch being set by
condition: Y happened.
action: clear switch #31

right??

3. ok... i tink im wight so .... how about AI script??
where i go to do that?
i guess there are programs out there to help me write it?
or... i can do it in some programming language available?

=LIFT=
 

-Azrael666-

BattleForums Senior Member
Joined
Jan 19, 2005
Messages
2,986
Reaction score
3
You need an AI editor, although I've never found one that works. If you're persistant, you can do what I do and actually build your own scripts.. like "Run AI Script Area Town at Location when elapsed scenario time is X" or something. Using a combination of pre-existing scripts, or other triggers like "order", you can build scripts like that. Much easier.

Yes, your views on triggers are correct. If you preserved both of those ones above, and then made a new trigger:

Condition:
Switch 31 is set

Actions:
Create 1 Marine at Location for Player.
Preserve Trigger.

Whenever X happened, marines would keep spawning at the location. When Y happened, it would stop. If X happened again, it'd start, etc.
 

=LIFT=

Member!
Joined
Oct 10, 2003
Messages
81
Reaction score
0
Website
Visit site
for AI scripts... i wanted something that will command my dropship to HOLD position and/or make my dropship pickup a specific unit(s) at some other location.

is it possible? and is it feasible on the game lag??

i figured i might can do the hold position by constantly creating a location
around the dropship and have the dropship ordered to Move to some location that's
anchored on the ground (or Patrol) - this might cause a lot of lag tho cuz it's a
constant execution of one trigger... and there are so many more to run thru!

also, i wish the "order" list would be more than just move/attack/patrol.
they should have a list with all possible unit commands and then only
allow choices of the ones that the specific unit(s) has available to it.
i guess no programs out there that can do this yet eh??

=LIFT=
 

-Azrael666-

BattleForums Senior Member
Joined
Jan 19, 2005
Messages
2,986
Reaction score
3
Set the player with the dropship to Neutral, and when it's attacked it won't move. Computer dropships will laways moved when attacked. If you want it to be a computer for some reason, than yes, you need an order trigger. Like "Always" "Order Dropship owned by Computer at Location X: Move to Location X" and preserve.. and have the location be about 7x7, with the center being where you want it moving to. Or you can have a 1x1 location in the center, and have the condition, instead of "Always", be "Computer brings at most 0 Dropship to Small Location".

As for making units enter a dropship, use the Run AI Script at Location, "Enter Transport". Alternatively, use "Exit Transport" to make them get back out.

I'm not sure exactly what you mean by the last paragraph :p
 

=LIFT=

Member!
Joined
Oct 10, 2003
Messages
81
Reaction score
0
Website
Visit site
nevermind my last paragraph.... i haven't completely read the whole list of AI scripts...
heh. i just haven't gotten that far yet in the overall depth of the editor.
.... or.. you can just call me lazy.

thanks for your answer tho!!

=LIFT=
 

-Azrael666-

BattleForums Senior Member
Joined
Jan 19, 2005
Messages
2,986
Reaction score
3
No problem :) It's my pleasure. Well.. not really 'pleasure'. But I don't mind helping :p
 

NewPosts

New threads

Top