Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (VoroneTZ, dr_panther, TedMar, vicknick), 833 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 6 1 2 3 4 5 6
Re: Script Factory [Re: Slin] #127660
05/03/07 15:33
05/03/07 15:33
Joined: Mar 2005
Posts: 969
ch
Loopix Offline
User
Loopix  Offline
User

Joined: Mar 2005
Posts: 969
ch
THIS IS FANTASTIC!!! The script works perfect...I could never have done it in a reasonable time frame. Big thanks once again...and keep it up

Re: Script Factory [Re: MadMark] #127661
05/03/07 17:05
05/03/07 17:05
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Quote:

Okay, here comes one that I haven't been able to figure out for the life of me.

I have a spaceship model, and I move it through my level. When it gets to within 100 quants of the outside of a planet model, I would like it to orbit the planet, left to right, facing slightly towards the planet. I would like it to continue orbitting the sphere and present a menu to the player, allowing key input or mouse clicks on the menu, until the "X" key is pressed. Once pressed, the menu should disappear, the ship should smoothly turn away from the planet, escape orbit by 50 quants, and return steering to the player.

Problems that I have had are that the spheres are different sizes, and everything that I do seems to focus on the origin of the sphere and not its perimeter. I either end up inside the planet model, or way too far away.

Might be too much, but hey, you asked!

Cheers
Mark





What are you exactly looking for?
Do you already have something working (like the shipcontrol), or shall I try to script everything from ground up? If so, It would be very nice if you could create a small level with at least the two models, because I don´t realy like creating levels and models... If you do so, I´ll give it a try.

Re: Script Factory [Re: robertbruce] #127662
05/03/07 18:33
05/03/07 18:33
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline OP
Expert
Slin  Offline OP
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Try this one robertbruce:
Code:

//skill1: TurnSpeed 10
//skill2: MoveSpeed 10
//skill3: JumpHeight 10
//skill4: JumpNode1 1
//skill5: JumpNode2 2
//skill6: JumpNode3 3
//skill7: JumpNode4 4
//skill8: JumpNode5 5
//skill9: JumpNode6 6
//skill10: JumpNode7 7
//skill11: JumpNode8 8
//skill12: JumpNode9 9
//skill13: JumpNode10 10
//flag1: JumpEveryNode
action patrol_path()
{
// attach entity to nearest path
result = path_scan(me,my.x,my.pan,vector(360,180,1000);
if (result == 0) { return; } // no path found

var NodePos[3];

// find first waypoint
var node = 1; // start at first node
path_getnode(my,node,NodePos,NULL);

var angle[3];

var Gravity;

while (1)
{
// find direction
result = vec_to_angle(angle,vec_diff(temp,NodePos,my.x));

// near target? Find next waypoint of the path
if (result < 25)
{
if(my.JumpEveryNode == on || node == my.JumpNode1 || node == my.JumpNode2
|| node == my.JumpNode3 || node == my.JumpNode4 || node == my.JumpNode5
|| node == my.JumpNode6 || node == my.JumpNode7 || node == my.JumpNode8
|| node == my.JumpNode9 || node == my.JumpNode10)
{
Gravity = my.JumpHeight;
}

node = path_nextnode(my,node,1);
path_getnode(my,node,NodePos,NULL);
}

my.skill21 = c_trace(my.x,vector(0,0,-10000),use_box|ignore_me|ignore_passents|ignore_passable);
if(my.skill21 > 5)
{
Gravity -= time_step;
}else
{
if(my.skill21 < 0)
{
Gravity += time_step;
}else
{
Gravity = 0;
}
}

// turn and walk towards target
my.pan += ((angle.pan > my.pan)-(angle.pan < my.pan))*time_step*my.TurnSpeed;
c_move(me,vector(my.MoveSpeed*time_step,0,Gravity),nullvector,glide|ignore_passents|ignore_passable);

wait(1);
}
}



But this is more the answer to your thread...

Re: Script Factory [Re: Slin] #127663
05/03/07 20:22
05/03/07 20:22
Joined: Jan 2007
Posts: 295
Portugal
Sam_Be Offline
Member
Sam_Be  Offline
Member

Joined: Jan 2007
Posts: 295
Portugal
could you make a script that makes some models follow the player?' for example in shooter games there are often many (two or 3) worriers fighting against the enamie, so they have to follow the player and help him fighting the bad guys.
could you make that??
thanks
sam


GS-Extra Looking for a scripter Suche einen scripter. Estou a procura de um "Scripter".
Re: Script Factory [Re: Sam_Be] #127664
05/04/07 10:01
05/04/07 10:01
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline
User
Mondivirtuali  Offline
User
M

Joined: Oct 2005
Posts: 528
Italy
I have a request too: perhaps put together the player combat script from A5 templates with the sword combat from AUM 12, so a player can fight with a zombie\monster\ogres, shooting them while the monster try to kill him with swords, axes, bare hands..just like the first Quake.

Re: Script Factory [Re: Mondivirtuali] #127665
05/04/07 10:20
05/04/07 10:20
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
Oh and maybe I good save and load system if you know what I mean


Visit:
schwenkschuster-design.de
Re: Script Factory [Re: aztec] #127666
05/04/07 12:48
05/04/07 12:48
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline
Serious User
jigalypuff  Offline
Serious User

Joined: Nov 2005
Posts: 1,007
i`d love a star trek style phaser with targeting code, pretty pretty please


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: Script Factory [Re: jigalypuff] #127667
05/04/07 17:07
05/04/07 17:07
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline
Expert
mpdeveloper_B  Offline
Expert

Joined: Feb 2006
Posts: 2,185
could you do quake3 style cheat console?


- aka Manslayer101
Re: Script Factory [Re: mpdeveloper_B] #127668
05/04/07 18:00
05/04/07 18:00
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline

Expert
Realspawn  Offline

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
perhaps you didn't see my answer about the cheat code thingie ?


Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: Script Factory [Re: Realspawn] #127669
05/04/07 22:21
05/04/07 22:21
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Slin, quick question, in the force bubble code you gave me, where it says modelnamefile, does it mean, model that will be using the code, or bubble model used for force shield? stupid question, i know.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Page 3 of 6 1 2 3 4 5 6

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1