Page 1 of 1

learning how to script

Posted: Sat Aug 08, 2009 1:46 am
by killerking
So, I want to script. To learn it, I'm doing the Ares tutorial and graydon helped me out yesterday. But now the udogs hl is down, so I need to ask this somewhere else.

How the hell do I make my reinforcements spawn??? I know got 3 actions in the first scripting box, I'll give them beneath here. ()=2nd box and []=3 box

TUNI.reins spawn (object test radius) [2 values] (activates on succes) [thrall @ reins attack + reinforcements]
CTRL.reinforcements (monster_identifier obje) [2 warriors + 1 dwarf] (visible flag) [true] (received user control flag) [true] (reinforcements alert) [true]
MELE.thrall @ reins attack (link; action identifier) [player as obje] (subject, monster_identifier) [4 thrall] (power over distance threshold) [2.001]

To give you some idea of what I'm trying to do, I'll explain that to. I'm using 'willow creek' and deleted all original map actions and scripts so I can place my own on them. After that I made an observer movement and groups of enemy units that have a trigger. Now I placed 3 'invisible' units at 'Tuncer's ale house' (in the town of willow creek) and I want them to become 'visible' if the player gets close enough. I placed the MELE.thrall @ reinforcements because I wanted to check if my TUNI.reins spawn works, but it seems the thrall get activated at the beginning of the level, and you don't need to get close to them, if you camp at the beginning of the level they'll come and get you to.

I hope you can help me, if you need more information on what I did just ask. Killerking

Re: learning how to script

Posted: Sat Aug 08, 2009 3:23 am
by Graydon
You havent 'answered' the 'who, where, when and how' questions for that TUNI. All you've specified is Where, and what happens next. You're not testing any number of subjects. Since there's no subjects, the TUNI 'succeeds'. In that tuni, like the river crossing TUNI we did together, you need to specify that it's the Player Units as Subject that you want to be testing for in the object test radius. You also need to specify how many, like we did last night using the 'Unit count greater than:' parameter.

Do that first and then you should have some new problems to deal with on that set of scripts. Don't want to feed too much info to you in one go though. Fix the above issue first, then move on. GL.

Re: learning how to script

Posted: Sat Aug 08, 2009 4:08 am
by killerking
Hey graydon,

Thanks, I was a bit brain dead I think. Anyway, in the time between my post and your reply I scripted a 'defeat' in case all player units die, and a 'victory' in case you kill a baron. If you damage the baron he runs away, and 3 groups of stygs will come after you :P . Those are all visible at the beginning, but maybe I'll learn some more things later.

Thanks, Killerking

P.S. 30 minutes later now, and it works!!! w00t. Still got to fine tune the distance and stuff, BUT IT WORKS!!!! I'll upload an beta somewhere so you can see it.

Uploaded, you can find it at http://www3.telus.net/dox/killerking/

Re: learning how to script

Posted: Sun Aug 09, 2009 11:14 am
by Sonixboom
just keep at it KK

ask around the udogs hotline if you need help

-Saint â€