2 registered members (VoroneTZ, TipmyPip),
1,333
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Script Factory
[Re: Slin]
#127660
05/03/07 15:33
05/03/07 15:33
|
Joined: Mar 2005
Posts: 969 ch
Loopix
User
|
User
Joined: Mar 2005
Posts: 969
ch
|
|
|
|
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
OP
Expert
|
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
OP
Expert
|
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
Member
|
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: aztec]
#127666
05/04/07 12:48
05/04/07 12:48
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
Serious User
|
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
Expert
|
Expert
Joined: Feb 2006
Posts: 2,185
|
could you do quake3 style cheat console?
- aka Manslayer101
|
|
|
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
Expert
|
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."
|
|
|
|