[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VBScript in VB

Posted on 2006-05-12
2
Medium Priority
?
216 Views
Last Modified: 2010-05-01
I am creating a cool Space fighting game called Stellar Attack Six. In this game the user will be able to script their own weapons using vbscript. For example:

sub initializeShot()
    xSpeed = 20 * cos(AngleOfNearestHeatSource)
    ySpeed = 20 * sin(AngleOfNearestHeatSource)
    HeatGenerated = 50
end sub

sub fireShotInterval()
    xSpeed = xSpeed + cos(AngleOfNearestHeatSource)
    ySpeed = ySpeed + sin(AngleOfNearestHeatSource)
end sub

sub impact(objectNumber as long)
    DammageRadius = (100 - fule)/10
    Dammage = 100 - fule
end sub

Ok, thats the general idea. But how do I take the written script and execute it within my program? Do I need some kind of control, or do I need to call an API? And is it possible for the scripter to do anything really sneaky, such as sctipting a virus to download off the internet? If so is there any way I can prevent this?
0
Comment
Question by:Sid_The_Kid
2 Comments
 
LVL 37

Accepted Solution

by:
Harisha M G earned 500 total points
ID: 16670678
Hi, you need Microsoft Script Control ...
http://www.microsoft.com/mind/0799/script/script.asp

---
Harish
0
 
LVL 2

Author Comment

by:Sid_The_Kid
ID: 16670878
Thanks, I think I can figure out the rest.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question