Post new topic    
Red Slime
Send private message
Scripting trouble, can anyone help? 
 PostThu Jun 30, 2011 10:11 pm
Send private message Reply with quote
Hi everyone,

We’ve got a plot scripting problem.

We want to put a large enemy graphic of a wagon into the town or layer 0. So I created the following script hayfield with the code as follows:

Code:
Script, hayfield, begin

variable (wagon)

wagon := load large enemy sprite (0)
put slice (wagon, 957, 0)   

end 


The engine accepted this and loaded this. I went into the map data and entered it into the engine, as I usually do with these scripts but wagon did not show up. So I guess my mistake is in the script above.

We also tried to create a parent of map 0 but could not find any way to do this in the plot scripting dictionary. This was why we settled on the script above.

What we want to ultimately do is to make it so bales of hay can be moved to this wagon. It is for an optional side quest for extra money and exp points.

So if anyone knows how to get that wagon onto the Map 0 or another way to set that side quest up, please let us know. We are at a loss as to how to do it ourselves.

Thanks,
The high and mighty confused queen of the thirteenth tile on the bathroom floor
Metal Slime
Send private message
 
 PostThu Jun 30, 2011 10:32 pm
Send private message Reply with quote
Quote:
put slice (wagon, 957, 0)


I'm guessing this is part of the problem. Slices go by "screen position" rather than "map position" by default, so positioning it at an X value of 957 would mean it'd be waaay off the edge of the screen somewhere.

I know it's possible to have a slice attached to an NPC or some point on the map, which seems like it would solve this problem pretty easily, but I haven't used slices enough to know exactly how to do that.
FYS:AHS -- Swapping out some step-on NPCs for zones + each step script
Puckamon -- Not until the reserve party is expanded.[/size]
Liquid Metal King Slime
Send private message
Re: Scripting trouble, can anyone help? 
 PostThu Jun 30, 2011 10:44 pm
Send private message Reply with quote
Try this:

Code:
Script, hayfield, begin

  variable (wagon, map layer)

  wagon := load large enemy sprite (0)
  map layer := lookup slice(sl:map layer 0)
  set parent(wagon, map layer)
  put slice (wagon, 957, 0)   

end 
Red Slime
Send private message
 
 PostThu Jun 30, 2011 10:52 pm
Send private message Reply with quote
Thank you both for the quick reply. We never thought of declaring the map-layer as a variable but we'll try it and let you know how it works.
The high and mighty confused queen of the thirteenth tile on the bathroom floor
Display posts from previous: