Jump to content



Photo
- - - - -

Moving primitives How to ( VP10 ) Scriptting HELP Needed

primitives vp10 script

  • Please log in to reply
12 replies to this topic

#1 gabrom78

gabrom78

    Enthusiast

  • Members
  • PipPipPip
  • 112 posts

  • Flag: Argentina

  • Favorite Pinball: The Twilight Zone, Vector, Tales of the arabian nights

Posted 18 July 2016 - 12:53 AM

Hello all!

 

im testing how to move primitives at a table, with nothing, just to see ways to move primitives, I discovered how to move it hitting them. with something like this.

I didnt find a post clear enough to understand the mechanics at primitives. I saw scrips from diferent tables and confused me more.

 

Usable commands ? =Trans (x,y,z), Rot (x,y,z) RotAndTrans (X,y,z), visible (1,0) ?

 

Sub Primitive_Hit()

       Primitive.TransX = 50

End Sub

 

or

 

Sub Primitive_Hit()

       Primitive.TransX = Score

       AddScore (+10)

End Sub

 

At the las example i tried to add score from another thing and the primitive didnt moves, ( i made a test checking and unchecking the Hit event and nothing) Only if the primitive itself add scorepoints the second example works.

I tried with a timer adding a value every 2 seconds, to use that data as a x,y,z value and nothing hppnds.

 

 

How can i move a primitive without hitting it?

How can i move a primitive using a timer or hitting another object at the table?

How can i link a primitive to another moving object ? maby some Sub checkSomehing?..

Is it posible to set the movement speed? or is only an update position what i saw?

 

 

Can you give me some script examples ?? I need to know it to continue with my table. Ways to move a primitive.

I really appreciate and need the help.

 

TY

 

Gabrom.

 

 

 

 



#2 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 18 July 2016 - 01:14 AM

Make sure the primitive has "Static Rendering" unchecked. "Has hit event" needs to be checked too, or the hit won't register.

 

Check commandreference.txt for a full list of commands

 

Sub Primitive_Hit()

       Primitive.TransX = Score

       AddScore (+10)

End Sub

This might not be working because the primitive is updating before the score is.

 

A few examples, the crate door on Scared Stiff using spinners:

Sub TiCrate_Timer()    'updates door
    if CrateOpen = False Then
        PrCrateDoor.RotX = -CrateSpinner_Closed.CurrentAngle
    Else
        PrCrateDoor.RotX = -CrateSpinner_Open.CurrentAngle
    end if
    if PrCrateDoor.RotX < -5 then controller.switch(57) = 1 else controller.Switch(57) = 0
End Sub

Another, Scared Stiff has a flat gate on the ramp that the ball pops up through. Simply just ties the rotation of an invisible flipper to the rotation of the primitive.

sub RampGateFlipper_Timer()    'Animates ramp popper gate
    Prim_RampDiverter2.RotX = RampGateFlipper.currentangle
end sub

A separate script handles the flipper rotation, and enables / disables the timer.


Edited by nFozzy, 18 July 2016 - 01:17 AM.


#3 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,133 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 18 July 2016 - 01:34 AM

To test the values you want to use, you can simply open the debug window, click on the > button, and type the changes there, i.e. primitive.transx = -10     and press Enter



#4 gabrom78

gabrom78

    Enthusiast

  • Members
  • PipPipPip
  • 112 posts

  • Flag: Argentina

  • Favorite Pinball: The Twilight Zone, Vector, Tales of the arabian nights

Posted 18 July 2016 - 01:53 AM

Yes, ill do that, i need to see the primitive position. i want to move a little train in my WIP table. 3 primitives following a path and reset it every cycle and toggling it collidable  property.-



#5 javier1515

javier1515

    Pinball Fan

  • VIP
  • 574 posts
  • Location:Villa Maria Cordoba

  • Flag: Argentina

  • Favorite Pinball: The Addams Family, Hook



Posted 18 July 2016 - 02:11 AM

gabrom78 de que parte de Argentina sos  :)


"Learning without thought is vain, thought without learning is dangerous." (Confucius)
 
"Aprender sin pensar es inútil, pensar sin aprender es peligroso". (Confucio)

 

 

Please, if you can help me with a small contribution to update my work team and continue to make more tables I will be eternally grateful.
 

#6 gabrom78

gabrom78

    Enthusiast

  • Members
  • PipPipPip
  • 112 posts

  • Flag: Argentina

  • Favorite Pinball: The Twilight Zone, Vector, Tales of the arabian nights

Posted 18 July 2016 - 02:13 AM

hola! de Bahía Blanca, sur de la Pacia de Bs As. ^_^



#7 javier1515

javier1515

    Pinball Fan

  • VIP
  • 574 posts
  • Location:Villa Maria Cordoba

  • Flag: Argentina

  • Favorite Pinball: The Addams Family, Hook



Posted 18 July 2016 - 02:29 AM

Es muy bueno ver gente de Argentina en la recreacion de tablas, me sentia muy solo  :wimper:

 

Te deseo la mejor de las suertes en todos tus projectos amigo.


"Learning without thought is vain, thought without learning is dangerous." (Confucius)
 
"Aprender sin pensar es inútil, pensar sin aprender es peligroso". (Confucio)

 

 

Please, if you can help me with a small contribution to update my work team and continue to make more tables I will be eternally grateful.
 

#8 jawdax

jawdax

    Enthusiast

  • Members
  • PipPipPip
  • 99 posts
  • Location:La Falda, Cordoba

  • Flag: Argentina

  • Favorite Pinball: Addams family, T2, Fish tales, Bride of pinbot, Black Rose

  • PS3 Gamer Tag: Jawdax

Posted 18 July 2016 - 05:38 AM

En algun momento arranco yo, por ahora solo retoco las fisicas y algunos otros detalles de las vpx que suben los demas. Ya les pedire ayuda cuando quiera avanzar en el tema

#9 gabrom78

gabrom78

    Enthusiast

  • Members
  • PipPipPip
  • 112 posts

  • Flag: Argentina

  • Favorite Pinball: The Twilight Zone, Vector, Tales of the arabian nights

Posted 18 July 2016 - 12:47 PM

Gracias! lo mismo digo! Me gusta el hacer juegos desde siempre, he hecho mapas en para wolfenstein et en etkradiant, participe un poquitin en Warthunder y ahora estoy haciendo juegos en UDK, claro que lo hago todo en tiempo libe y de pasatiempo, menos UDK donde estoy haciendo uno con fines comerciales ^^ Visualpinball es unas vacaciones del trabajo de hormiga del UDK. ^^



#10 gabrom78

gabrom78

    Enthusiast

  • Members
  • PipPipPip
  • 112 posts

  • Flag: Argentina

  • Favorite Pinball: The Twilight Zone, Vector, Tales of the arabian nights

Posted 18 July 2016 - 09:57 PM

I just Solved the scripting primitve theme, ty to all! ^_ ^



#11 ganjafarmer

ganjafarmer

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: Attack from Mars

Posted 17 August 2017 - 12:33 AM

I don't want to start new topic.

 

When i move collidable primitive using TransX in script the primitive moves as i want but the collision shape stays on origin point.

 

Is it possible to make collidable primitive move with own hit points?

 

I see some tables with moving collidable prims are using a lot of walls for hit points, there is no other way?


One day i'll build Vitalik statue out of used AMD gpu's.


#12 Rantar

Rantar

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: Germany

  • Favorite Pinball: Attack from Mars

Posted 09 December 2017 - 06:43 AM

I don't want to start new topic.

 

When i move collidable primitive using TransX in script the primitive moves as i want but the collision shape stays on origin point.

 

Is it possible to make collidable primitive move with own hit points?

 

I see some tables with moving collidable prims are using a lot of walls for hit points, there is no other way?

 

I got the same problem, please someone respond. What is the best way to move collidable primitives?



#13 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 09 December 2017 - 07:47 AM

By making a bunch of them and toggling collision on and off

 

Unless you can figure out how to do it with rotating flippers or balls. Those are the only true dynamic objects.







Also tagged with one or more of these keywords: primitives, vp10, script