Scripting Help for Newb - A summoning of sorts..

A forum for discussing map making ideas and problems for the Myth series.
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Post by Pyro »

Oh no! I forgot that you were using multiple Summoner units on different teams for the same map. I had actually started a map with a similar idea about a year or two ago... but the color map I was using I didn't like and therefore I paused it and deleted with the intent of restarting it one day.

What you have to do for it to work is make different Summoner units.

If there are two teams you will need to make a copy of your Summoner unit. Exactly the same... you can call it Summoner2 or whatnot for the monster and unit tags. The proj it uses for the script to summon units will have to be copied. Let us say Summoner1 has the proj 'smrk' then Summoner2 will have to have the copy of that which we will call 'smr2'. And mirrored copy of the script with have that one change. Also, make sure that the "Minions" are two different groups of units as well. You don't want to summon an enemy unit next to you. hehe

So if there are two teams make "Minions Team0" and "Minions Team1" or call them what you like.

Let me know how it works out.
TheHelmet
Posts: 160
Joined: Mon Apr 17, 2006 11:37 am
Location: Stockholm

Post by TheHelmet »

Yeah, no problem, I understood (after a few tries) that I had to duplicate the script, unit and projectiles tags and name them separately to make sure there were no scripting conflicts.

0 Conjurer uses summon initial (summon MARKER -> suma)
1 Conjurer uses summon starter (summon MORKER -> sumo)

The script actions were at first duplicated and added - for Team 0 and + for Team 1 at the start of their actions.
(I don't know if it's relevant but I think I tried both, using dest for Team 0's Tested Items Inside Local Field Name, and plac for Team 1's Tested Items Inside Local Field Name.)
The monster groups were labelled 'good' for Team 0 and 'evil' for Team 1, both groups consist of only units imported to the mesh as Uncontrollable and Invisible and belonging to either team.

I've since tried deleting the entire script and starting over from scratch but it just won't work. :cry:

Is this supposed to happen?
Map action debug says:
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: 1 objects inside geometry ignored
Image
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Post by haravikk »

Hrm, it shouldn't say ignored, it should say "1 objects outside of geometry" or such for units that don't match your criteria, unless the messages are different on different platforms?
Being Haravikk gets you girls like these:
Image
TheHelmet
Posts: 160
Joined: Mon Apr 17, 2006 11:37 am
Location: Stockholm

Post by TheHelmet »

haravikk wrote:Hrm, it shouldn't say ignored, it should say "1 objects outside of geometry" or such for units that don't match your criteria, unless the messages are different on different platforms?
I'm on a PC..

Here's the whole debugging session for only the 'Any summon markers on the map' action:
2006-04-24 18:34:58 ### MA [geom] - Any Summon Marker on the Map: found 0 objects of type suma
2006-04-24 18:34:58 ### MA [geom] - Any Summon Marker on the Map: nothing to test against!
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: found 1 objects of type suma
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: testing objects against entire map
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: 1 objects inside geometry ignored
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: 0 objects outside geometry ignored
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: 1 objects points inside geometry (added to dest)
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: 0 objects points outside geometry ignored
2006-04-24 18:34:59 ### MA [geom] - Any Summon Marker on the Map: succeeded

I found it a bit odd that the object would be ignored, but I'm not sure if it's wrong since it seems to be adding it to dest. But when the script tries the action Grab a Demon it states:
2006-04-24 18:34:59 ### MA [tuni] - Four Demon Limit: count: 0<5
2006-04-24 18:34:59 ### MA [tuni] - Four Demon Limit: test action successful
2006-04-24 18:34:59 ### MA [tuni] - Four Demon Limit: succeeded
2006-04-24 18:34:59 ### MA [tuni] - Four Demon Limit: deactivated
2006-04-24 18:34:59 ### MA [geom] - Grab a Demon: nothing to test against!
2006-04-24 18:34:59 ### MA [geom] - Grab a Demon: failed
2006-04-24 18:34:59 ### MA [geom] - Grab a Demon: deactivated

Weirdness. :cry: :mad:
Image
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Post by Pyro »

Why did you replace the 'dest' with 'plac'? Both scripts should use 'dest'. If it says that it "ignored" it you might have picked the "Tested Item Outside Field Name" instead of "Tested Item Inside Field Name"... well that's my guess without actually testing it.

On your other try you seemed to have done it right before trying to make it work for two teams. I know this script works... since I am using it currently for the project. Make sure everything is connected right... keep in mind that let's say the following example:

Script "A" Action 1... succeeds goes to Script "A" Action 2
Script "A" Action 2... succeeds goes to Script "A" Action 3
Script "A" Action 3.

If you copy that script... and rename it but don't alter what they succeed to you will end up with something like this:

Script "B" Action 1... succeeds goes to Script "A" Action 2
Script "B" Action 2... succeeds goes to Script "A" Action 3
Script "B" Action 3.

Instead of...

Script "B" Action 1... succeeds goes to Script "B" Action 2
Script "B" Action 2... succeeds goes to Script "B" Action 3
Script "B" Action 3.

So make the first script and when you copy it... Rename the copy first... add "2" or whatever so they arent named exactly the same. Then go through it all each action and make it succeed to the new copy instead of the original.
TheHelmet
Posts: 160
Joined: Mon Apr 17, 2006 11:37 am
Location: Stockholm

Post by TheHelmet »

Thanks for all the help guys! Looks like I somehow managed to solve it by going over the script action by action for the 100th time..
The script couldn't find the monsters I had referenced but it's ok now, if I make good time on the rest of the map it might be ready for release in a couple of weeks.. :p :0
Image
Post Reply