Jump to content


Photo

Object spawn problem


  • Please log in to reply
14 replies to this topic

#1 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 07 June 2008 - 02:03 AM

Hello.

I am making a heavily scripted map.

The current script I am working on is basically....

When structure A is killed spawn unit named B.

When unit B is killed, spawn structure named A on waypoint X.


They do not deactivate upon success so they can continue throughout the game.


Now I can target structure A fine, and destroy it. Then unit B spawns properly. I then get him killed, and them boom the new structure A is spawned. Now here is where the problem is.

Then newly spawned structure A is targetable, but my unit just runs right to the center of the structure and stands there, even though it is targetable. The structure has some problem that unit will not attack it, but instead just run towards its center.

Any help?

Edited by Ap0C552, 07 June 2008 - 02:03 AM.


#2 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 07 June 2008 - 03:37 AM

What structure is this?

Trying to hold on...


#3 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 07 June 2008 - 05:41 PM

MordorCampKeep
It is targetable fine. I can destroy it. But when it respawns, it is then not able to be destroyed.

EDIT: I replaced mordorcampkeep with MordorBattleTower, and the same problem exists.

Note the the structure is set to respawn on team creeps.

Edited by Ap0C552, 07 June 2008 - 06:22 PM.


#4 m@tt

m@tt

    #######

  • Project Team
  • 4,056 posts
  • Location:England
  • Projects:The Dwarf Holds
  •  T3A Chamber Member

Posted 08 June 2008 - 12:19 AM

Can you post up exactly what the scripts say (you can copy and paste the text in the lower-right hand section of the Scripts window (i.e. the preview bit). My guess would be that you haven't given it to a team (though you say you have).
Posted Image

#5 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 08 June 2008 - 03:11 PM

OK just so you know. For the first script. this is the only one that I can use that achieves my goal.

*** IF ***
Unit 'evilshrine' has been destroyed by a(n) 'GondorAragorn'
*** OR ***
Unit 'evilshrine' has been destroyed by a(n) 'RohanRohirrim'
*** THEN ***
Spawn Unit 'evilgollum2' of type 'NeutralGollum' on Team 'Player_2/teamPlayer_2' at waypoint Waypoint 'evilgollumspawn'
Disable Script 'evilshrineP2'.

THEN here is the script that I imagine is the problem.

*** IF ***
Unit 'evilgollum2' has been destroyed.
*** THEN ***
Spawn Unit 'evilshrine' of type 'MordorBattleTower' on Team 'PlyrCreeps/teamPlyrCreeps' at waypoint Waypoint 'evilshrinespawn'

Note that I have tried placing it on different teams, and I have tried multiple buildings. Still same problem. Please don't tell me things like "check to make sure the waypoint exists". Not that I don't appreciate your help, but just assume I am not a total noob, and I have already gone over obvious things like this. Thanks. :p

Edited by Ap0C552, 08 June 2008 - 03:12 PM.


#6 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 08 June 2008 - 04:06 PM

Try changing the name of the MordorBattleTower, because something else already has this name.

Trying to hold on...


#7 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 08 June 2008 - 07:32 PM

Good suggestion lurtz.

I just tried giving the spawned object a new unique name with no success. :p

Thanks for the suggestion though.

#8 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 09 June 2008 - 08:06 PM

Zip up your scripts and upload them to the site and I'll see what I can do.

Trying to hold on...


#9 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 09 June 2008 - 11:33 PM

There ya go.

Attached Files



#10 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 15 June 2008 - 03:57 PM

bump

#11 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 15 June 2008 - 07:23 PM

I tried, but couldn't figure out what was wrong, sorry.

Trying to hold on...


#12 Ap0C552

Ap0C552
  • Members
  • 84 posts

Posted 17 June 2008 - 01:51 AM

Thanks for trying.

#13 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 17 June 2008 - 02:55 PM

Anytime, anytime.

Trying to hold on...


#14 TowerGuard418

TowerGuard418
  • Project Team
  • 164 posts
  • Projects:RJ-RotWK Mapper

Posted 17 June 2008 - 04:12 PM

I think when some structures are spawned through scripting, the map doesn't know that they are there. For example, once I tried to spawn a wight lair once a building was captured. It worked, but the units could walk through it. And when it was destroyed, all units could attack the rubble. I think the map registered that the lair was destroyed, and then set up everythink it needed.

Basicly, I think structures aren't meant to be spawned.

Edited by TowerGuard418, 17 June 2008 - 04:13 PM.

Posted Image
Posted Image

#15 Puppeteer

Puppeteer

    title available

  • Global Moderators
  • 2,947 posts
  • Location:United Kingdom
  •  Faute de Mieux
  • Division:Community
  • Job:Magazine Staff/Global Moderator

Posted 21 June 2008 - 06:40 PM

Wouldn't be the first problem with structures...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users