add an actor via script (not create actor)

Ideas for Game Editor evolution.

add an actor via script (not create actor)

Postby feral » Thu May 08, 2008 6:25 am

I am still trying to figure out how to make independent canvas clones that i can use different "draw_from" scripts in.

another way it could be done is if i could "add" and actor via the scripts and then "insert" actions or script lines

eg: pseudo code

for i=1;1<100;i++

Add_Actor(canvas, name+"i") // add a new canvas actor called name1, name 2, name3 etc etc

Insert_Action(name+i, Create _Actor, script, "draw_from("objecttoscale", 1, 1, i)" );

//insert an action ( in this case in the create actor) and make it a script action,
//then insert text "draw_from("objecttoscale", 1, 1, i)"
// use draw_from to scale from 1 to 100 according to 'i')


in otherwords, if I could ADD individual canvas actors (not clones) from the script line, and insert a scalable draw_from routine, I could then make a series of pre-scaled (pre-rendered) sprites - ready to swap in an out during draw time..

just an idea..

Feral
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score

Re: add an actor via script (not create actor)

Postby DST » Thu May 08, 2008 1:28 pm

I don't have an 'answer' as such, but it has something to do with accessing the actor struct, or creating a function that does the same thing. Kinda like the Getclone2 script....its a recreation of getclone that allows you to specify variables on the fly.

What you mean to say is that you want a USER created actor....that's the difference. I don't know if GE allows user created actors.....The syntax involved would be much longer than the normal creatactor syntax. Every variable that an actor can have must be included....not just xy, parent, path, but also transp, zdepth, infinite tiling.....(i think)

One more thing; your script or struct will also have to specify the size of the created actor. That's something i've tried to do with wireframes on the fly and have had no success at. But then again, I'm no expert.

I think a createactor function will have to be made. You can determine the basic needs of this function based off mak's explanation of the original function in the documentation.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest